Package io.antmedia.statistic
Interface IStatsCollector
- All Known Implementing Classes:
StatsCollector
public interface IStatsCollector
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Check if cpu usage and ram usage does not exceed the limitint
It's configurable and it's based on percentage.int
It calculates the average CPU usage for a specified time.int
In MBint
It'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
-