public interface ProcessCpuSampler
Modifier and Type | Field and Description |
---|---|
static int |
cores
CPU utilization is expressed as a fraction of 100% (dividing by the number of CPU cores),
even though some vendors scale to N*100% if multiple CPUs (N CPUs) exist.
|
static long |
NA
Indicates sample is not available.
|
Modifier and Type | Method and Description |
---|---|
default double |
getCpuLoadCumulative(long totalCpuTime,
long upTime)
Gets CPU utilization of this process as a fraction of 100%.
|
long |
sampleTotalCpuTime()
Gets the number of milliseconds the process has executed in kernel or user mode.
|
static final long NA
static final int cores
com.gs.process.cpu.utilization.divideByCores
with false.long sampleTotalCpuTime()
default double getCpuLoadCumulative(long totalCpuTime, long upTime)
This calculation sums CPU ticks across all processors and may exceed 100% for
multi-threaded processes. This is consistent with the cumulative CPU
presented by the "top" command on Linux/Unix machines. This value is divided
by the cores
to return a fraction of 100%.
Copyright © GigaSpaces.