@Private
@Unstable
public class CpuTimeTracker
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
static int |
UNAVAILABLE |
| Constructor | Description |
|---|---|
CpuTimeTracker(long jiffyLengthInMillis) |
| Modifier and Type | Method | 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.
|
java.lang.String |
toString() |
|
void |
updateElapsedJiffies(java.math.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(java.math.BigInteger elapsedJiffies,
long newTime)
elapsedJiffies - updated jiffiesnewTime - new sample timepublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2008–2025 Apache Software Foundation. All rights reserved.