public enum SystemStatisticsTracker extends java.lang.Enum<SystemStatisticsTracker>
Enum Constant and Description |
---|
INSTANCE
The unique instance
|
Modifier and Type | Field and Description |
---|---|
static org.apache.log4j.Logger |
log
Used for logging.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
checkExcessMemoryUse(double currentUse)
Checks to see if a current amount of memory use is beyond the thresholds set, and logs a message if required
|
double |
getAverageMemoryUsePercent()
Returns the average memory use as a percent from 0 to 100 (with 1 decimal point precision)
|
double |
getAverageSystemCpuUsePercent()
Returns the average cpu use for the system as a percent from 0 to 100 (with 1 decimal point precision)
|
double |
getCurrentSystemCpuUsePercent()
Returns the current cpu use for the system as a percent from 0 to 100 (with 1 decimal point precision)
|
double |
getMemoryUseAfterLastGC()
Returns the memory use immediately after the last garbage collection was run as a percent from 0 to 100 (with 1 decimal point precision)
|
static SystemStatisticsTracker |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static SystemStatisticsTracker[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SystemStatisticsTracker INSTANCE
public static SystemStatisticsTracker[] values()
for (SystemStatisticsTracker c : SystemStatisticsTracker.values()) System.out.println(c);
public static SystemStatisticsTracker valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullvoid checkExcessMemoryUse(double currentUse)
currentUse
- The current percent of memory being usedpublic double getAverageMemoryUsePercent()
public double getMemoryUseAfterLastGC()
public double getAverageSystemCpuUsePercent()
public double getCurrentSystemCpuUsePercent()