Package io.antmedia.statistic
Interface IStatsCollector
- All Known Implementing Classes:
StatsCollector
public interface IStatsCollector
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck if cpu usage and ram usage does not exceed the limitintIt's configurable and it's based on percentage.intIt calculates the average CPU usage for a specified time.intIn MBintIt's configurable In MB
-
Field Details
-
BEAN_NAME
- See Also:
-
-
Method Details
-
getCpuLoad
int getCpuLoad()It calculates the average CPU usage for a specified time.- Returns:
- the current CPU usage
-
getCpuLimit
int getCpuLimit()It's configurable and it's based on percentage. Max value is 100.- Returns:
- the CPU limit that server does not exceed.
-
getMinFreeRamSize
int getMinFreeRamSize()It's configurable In MB- Returns:
- the free RAM size that server should have all the time
-
getFreeRam
int getFreeRam()In MB- Returns:
- the free RAM that server can use
-
enoughResource
boolean enoughResource()Check if cpu usage and ram usage does not exceed the limit- Returns:
- true if not exceeding the limit, false if exceeding limit
-