set cpu load unit to "{run_queue_item}" (#8777)

This commit is contained in:
Gregor Zeitlinger 2023-07-24 20:10:38 +02:00 committed by GitHub
parent cabf0dfdf4
commit 21e3fe5178
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -89,7 +89,7 @@ public final class Cpu {
meter
.gaugeBuilder("process.runtime.jvm.system.cpu.load_1m")
.setDescription("Average CPU load of the whole system for the last minute")
.setUnit("1")
.setUnit("{run_queue_item}")
.buildWithCallback(
observableMeasurement -> {
double loadAverage = osBean.getSystemLoadAverage();

View File

@ -45,7 +45,7 @@ class CpuTest {
assertThat(metricData)
.hasInstrumentationScope(EXPECTED_SCOPE)
.hasDescription("Average CPU load of the whole system for the last minute")
.hasUnit("1")
.hasUnit("{run_queue_item}")
.hasDoubleGaugeSatisfying(
gauge -> gauge.hasPointsSatisfying(point -> point.hasValue(2.2)))));
testing.waitAndAssertMetrics(