From d4be3b9f31e5d299282c52d17690d8f4e20c1ca6 Mon Sep 17 00:00:00 2001 From: Ben Reedy Date: Sun, 23 Jan 2022 14:31:38 +1000 Subject: [PATCH] Ensure CPU time description matches `mode` flag Signed-off-by: Ben Reedy --- collector/cpu.go | 4 ++-- docs/collector.cpu.md | 2 +- tools/e2e-output.txt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/collector/cpu.go b/collector/cpu.go index 5596c71e..8c5c4c31 100644 --- a/collector/cpu.go +++ b/collector/cpu.go @@ -60,7 +60,7 @@ func newCPUCollector() (Collector, error) { ), TimeTotal: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "time_total"), - "Time that processor spent in different modes (idle, user, system, ...)", + "Time that processor spent in different modes (dpc, idle, interrupt, privileged, user)", []string{"core", "mode"}, nil, ), @@ -88,7 +88,7 @@ func newCPUCollector() (Collector, error) { ), TimeTotal: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "time_total"), - "Time that processor spent in different modes (idle, user, system, ...)", + "Time that processor spent in different modes (dpc, idle, interrupt, privileged, user)", []string{"core", "mode"}, nil, ), diff --git a/docs/collector.cpu.md b/docs/collector.cpu.md index 71dd962b..ca30fb2a 100644 --- a/docs/collector.cpu.md +++ b/docs/collector.cpu.md @@ -19,7 +19,7 @@ These metrics are available on all versions of Windows: Name | Description | Type | Labels -----|-------------|------|------- `windows_cpu_cstate_seconds_total` | Time spent in low-power idle states | counter | `core`, `state` -`windows_cpu_time_total` | Time that processor spent in different modes (idle, user, system, ...) | counter | `core`, `mode` +`windows_cpu_time_total` | Time that processor spent in different modes (dpc, idle, interrupt, privileged, user) | counter | `core`, `mode` `windows_cpu_interrupts_total` | Total number of received and serviced hardware interrupts | counter | `core` `windows_cpu_dpcs_total` | Total number of received and serviced deferred procedure calls (DPCs) | counter | `core` diff --git a/tools/e2e-output.txt b/tools/e2e-output.txt index c36e5e7e..f45ebe4b 100644 --- a/tools/e2e-output.txt +++ b/tools/e2e-output.txt @@ -85,7 +85,7 @@ test_alpha_total 42 # TYPE windows_cpu_parking_status gauge # HELP windows_cpu_processor_performance Processor Performance is the average performance of the processor while it is executing instructions, as a percentage of the nominal performance of the processor. On some processors, Processor Performance may exceed 100% # TYPE windows_cpu_processor_performance gauge -# HELP windows_cpu_time_total Time that processor spent in different modes (idle, user, system, ...) +# HELP windows_cpu_time_total Time that processor spent in different modes (dpc, idle, interrupt, privileged, user) # TYPE windows_cpu_time_total counter # HELP windows_cs_hostname Labeled system hostname information as provided by ComputerSystem.DNSHostName and ComputerSystem.Domain # TYPE windows_cs_hostname gauge