set cpu load unit to "{run_queue_item}" (#8777)
This commit is contained in:
parent
cabf0dfdf4
commit
21e3fe5178
|
@ -89,7 +89,7 @@ public final class Cpu {
|
||||||
meter
|
meter
|
||||||
.gaugeBuilder("process.runtime.jvm.system.cpu.load_1m")
|
.gaugeBuilder("process.runtime.jvm.system.cpu.load_1m")
|
||||||
.setDescription("Average CPU load of the whole system for the last minute")
|
.setDescription("Average CPU load of the whole system for the last minute")
|
||||||
.setUnit("1")
|
.setUnit("{run_queue_item}")
|
||||||
.buildWithCallback(
|
.buildWithCallback(
|
||||||
observableMeasurement -> {
|
observableMeasurement -> {
|
||||||
double loadAverage = osBean.getSystemLoadAverage();
|
double loadAverage = osBean.getSystemLoadAverage();
|
||||||
|
|
|
@ -45,7 +45,7 @@ class CpuTest {
|
||||||
assertThat(metricData)
|
assertThat(metricData)
|
||||||
.hasInstrumentationScope(EXPECTED_SCOPE)
|
.hasInstrumentationScope(EXPECTED_SCOPE)
|
||||||
.hasDescription("Average CPU load of the whole system for the last minute")
|
.hasDescription("Average CPU load of the whole system for the last minute")
|
||||||
.hasUnit("1")
|
.hasUnit("{run_queue_item}")
|
||||||
.hasDoubleGaugeSatisfying(
|
.hasDoubleGaugeSatisfying(
|
||||||
gauge -> gauge.hasPointsSatisfying(point -> point.hasValue(2.2)))));
|
gauge -> gauge.hasPointsSatisfying(point -> point.hasValue(2.2)))));
|
||||||
testing.waitAndAssertMetrics(
|
testing.waitAndAssertMetrics(
|
||||||
|
|
Loading…
Reference in New Issue