public class CpuTimeTracker extends Object
Modifier and Type | Field and Description |
---|---|
static int |
UNAVAILABLE |
Constructor and Description |
---|
CpuTimeTracker(long jiffyLengthInMillis) |
Modifier and Type | Method and Description |
---|---|
float |
getCpuTrackerUsagePercent()
Return percentage of cpu time spent over the time since last update.
|
long |
getCumulativeCpuTime()
Obtain the cumulative CPU time since the system is on.
|
String |
toString() |
void |
updateElapsedJiffies(BigInteger elapsedJiffies,
long newTime)
Apply delta to accumulators.
|
public static final int UNAVAILABLE
public float getCpuTrackerUsagePercent()
UNAVAILABLE
if there haven't been 2 updates more than minimumTimeInterval
apartpublic long getCumulativeCpuTime()
public void updateElapsedJiffies(BigInteger elapsedJiffies, long newTime)
elapsedJiffies
- updated jiffiesnewTime
- new sample timeCopyright © 2023–2024 The Apache Software Foundation. All rights reserved.