public class CpuGaugeSet extends Object implements com.codahale.metrics.MetricSet
| Modifier and Type | Field and Description |
|---|---|
private OperatingSystemMXBean |
bean |
static String |
CPU_PROCESS_LOAD
The key to retrieve the CPU process load.
|
static String |
CPU_PROCESS_TIME
The key to retrieve the CPU process time.
|
static String |
CPU_SYSTEM_LOAD
The key to retrieve the CPU system load.
|
static String |
PROCESSORS
The key to retrieve the number of processor.
|
static String |
SYSTEM_LOAD_AVERAGE
The key to retrieve the system load.
|
| Constructor and Description |
|---|
CpuGaugeSet() |
| Modifier and Type | Method and Description |
|---|---|
private Double |
getCpuProcessLoad()
This method uses a Sun specific class (implementation of the Operating System MX Bean.
|
private Long |
getCpuTime()
This method uses a Sun specific class (implementation of the Operating System MX Bean.
|
Map<String,com.codahale.metrics.Metric> |
getMetrics() |
private Double |
getSystemCpuLoad()
This method uses a Sun specific class (implementation of the Operating System MX Bean.
|
public static final String PROCESSORS
public static final String SYSTEM_LOAD_AVERAGE
public static final String CPU_SYSTEM_LOAD
public static final String CPU_PROCESS_LOAD
public static final String CPU_PROCESS_TIME
private OperatingSystemMXBean bean
public Map<String,com.codahale.metrics.Metric> getMetrics()
getMetrics in interface com.codahale.metrics.MetricSetprivate Double getSystemCpuLoad()
private Double getCpuProcessLoad()
private Long getCpuTime()
Copyright © 2013–2015 Wisdom Framework. All rights reserved.