From 15e36e223059396d98b272d790d3e3300f62e097 Mon Sep 17 00:00:00 2001 From: John Belmonte Date: Fri, 11 Oct 2019 01:59:06 +0900 Subject: [PATCH] fix typo in cpufreq metric names (#1510) Signed-off-by: John Belmonte --- CHANGELOG.md | 2 ++ collector/cpufreq_linux.go | 4 ++-- collector/fixtures/e2e-64k-page-output.txt | 24 +++++++++++----------- collector/fixtures/e2e-output.txt | 24 +++++++++++----------- 4 files changed, 28 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ccd5dab4..8eaf7730 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - `node_md_disks` now has a `state` label for "fail", "spare", "active" disks. - `node_md_is_active` is replaced by `node_md_state` with a state set of "active", "inactive", "recovering", "resync". * Additional label `mountaddr` added to NFS device metrics to distinguish mounts from the same URL, but different IP addresses. #1417 +* Metrics node_cpu_scaling_frequency_min_hrts and node_cpu_scaling_frequency_max_hrts of the cpufreq collector were renamed to node_cpu_scaling_frequency_min_hertz and node_cpu_scaling_frequency_max_hertz. #1510 ### Changes @@ -28,6 +29,7 @@ * [BUGFIX] Fix netdev nil reference on Darwin #1414 * [BUGFIX] Strip path.rootfs from mountpoint labels #1421 * [BUGFIX] Fix empty string in path.rootfs #1464 +* [BUGFIX] Fix typo in cpufreq metric names #1510 ## 0.18.1 / 2019-06-04 diff --git a/collector/cpufreq_linux.go b/collector/cpufreq_linux.go index d2560dc2..22e03654 100644 --- a/collector/cpufreq_linux.go +++ b/collector/cpufreq_linux.go @@ -66,12 +66,12 @@ func NewCPUFreqCollector() (Collector, error) { []string{"cpu"}, nil, ), scalingFreqMin: prometheus.NewDesc( - prometheus.BuildFQName(namespace, cpuCollectorSubsystem, "scaling_frequency_min_hrts"), + prometheus.BuildFQName(namespace, cpuCollectorSubsystem, "scaling_frequency_min_hertz"), "Minimum scaled cpu thread frequency in hertz.", []string{"cpu"}, nil, ), scalingFreqMax: prometheus.NewDesc( - prometheus.BuildFQName(namespace, cpuCollectorSubsystem, "scaling_frequency_max_hrts"), + prometheus.BuildFQName(namespace, cpuCollectorSubsystem, "scaling_frequency_max_hertz"), "Maximum scaled cpu thread frequency in hertz.", []string{"cpu"}, nil, ), diff --git a/collector/fixtures/e2e-64k-page-output.txt b/collector/fixtures/e2e-64k-page-output.txt index 5751d39e..c7fe830f 100644 --- a/collector/fixtures/e2e-64k-page-output.txt +++ b/collector/fixtures/e2e-64k-page-output.txt @@ -228,18 +228,18 @@ node_cpu_scaling_frequency_hertz{cpu="0"} 1.699981e+09 node_cpu_scaling_frequency_hertz{cpu="1"} 1.699981e+09 node_cpu_scaling_frequency_hertz{cpu="2"} 8e+06 node_cpu_scaling_frequency_hertz{cpu="3"} 8e+06 -# HELP node_cpu_scaling_frequency_max_hrts Maximum scaled cpu thread frequency in hertz. -# TYPE node_cpu_scaling_frequency_max_hrts gauge -node_cpu_scaling_frequency_max_hrts{cpu="0"} 3.7e+09 -node_cpu_scaling_frequency_max_hrts{cpu="1"} 3.7e+09 -node_cpu_scaling_frequency_max_hrts{cpu="2"} 4.2e+09 -node_cpu_scaling_frequency_max_hrts{cpu="3"} 4.2e+09 -# HELP node_cpu_scaling_frequency_min_hrts Minimum scaled cpu thread frequency in hertz. -# TYPE node_cpu_scaling_frequency_min_hrts gauge -node_cpu_scaling_frequency_min_hrts{cpu="0"} 8e+08 -node_cpu_scaling_frequency_min_hrts{cpu="1"} 8e+08 -node_cpu_scaling_frequency_min_hrts{cpu="2"} 1e+06 -node_cpu_scaling_frequency_min_hrts{cpu="3"} 1e+06 +# HELP node_cpu_scaling_frequency_max_hertz Maximum scaled cpu thread frequency in hertz. +# TYPE node_cpu_scaling_frequency_max_hertz gauge +node_cpu_scaling_frequency_max_hertz{cpu="0"} 3.7e+09 +node_cpu_scaling_frequency_max_hertz{cpu="1"} 3.7e+09 +node_cpu_scaling_frequency_max_hertz{cpu="2"} 4.2e+09 +node_cpu_scaling_frequency_max_hertz{cpu="3"} 4.2e+09 +# HELP node_cpu_scaling_frequency_min_hertz Minimum scaled cpu thread frequency in hertz. +# TYPE node_cpu_scaling_frequency_min_hertz gauge +node_cpu_scaling_frequency_min_hertz{cpu="0"} 8e+08 +node_cpu_scaling_frequency_min_hertz{cpu="1"} 8e+08 +node_cpu_scaling_frequency_min_hertz{cpu="2"} 1e+06 +node_cpu_scaling_frequency_min_hertz{cpu="3"} 1e+06 # HELP node_cpu_seconds_total Seconds the cpus spent in each mode. # TYPE node_cpu_seconds_total counter node_cpu_seconds_total{cpu="0",mode="idle"} 10870.69 diff --git a/collector/fixtures/e2e-output.txt b/collector/fixtures/e2e-output.txt index 0b76eeb6..a10db8a4 100644 --- a/collector/fixtures/e2e-output.txt +++ b/collector/fixtures/e2e-output.txt @@ -228,18 +228,18 @@ node_cpu_scaling_frequency_hertz{cpu="0"} 1.699981e+09 node_cpu_scaling_frequency_hertz{cpu="1"} 1.699981e+09 node_cpu_scaling_frequency_hertz{cpu="2"} 8e+06 node_cpu_scaling_frequency_hertz{cpu="3"} 8e+06 -# HELP node_cpu_scaling_frequency_max_hrts Maximum scaled cpu thread frequency in hertz. -# TYPE node_cpu_scaling_frequency_max_hrts gauge -node_cpu_scaling_frequency_max_hrts{cpu="0"} 3.7e+09 -node_cpu_scaling_frequency_max_hrts{cpu="1"} 3.7e+09 -node_cpu_scaling_frequency_max_hrts{cpu="2"} 4.2e+09 -node_cpu_scaling_frequency_max_hrts{cpu="3"} 4.2e+09 -# HELP node_cpu_scaling_frequency_min_hrts Minimum scaled cpu thread frequency in hertz. -# TYPE node_cpu_scaling_frequency_min_hrts gauge -node_cpu_scaling_frequency_min_hrts{cpu="0"} 8e+08 -node_cpu_scaling_frequency_min_hrts{cpu="1"} 8e+08 -node_cpu_scaling_frequency_min_hrts{cpu="2"} 1e+06 -node_cpu_scaling_frequency_min_hrts{cpu="3"} 1e+06 +# HELP node_cpu_scaling_frequency_max_hertz Maximum scaled cpu thread frequency in hertz. +# TYPE node_cpu_scaling_frequency_max_hertz gauge +node_cpu_scaling_frequency_max_hertz{cpu="0"} 3.7e+09 +node_cpu_scaling_frequency_max_hertz{cpu="1"} 3.7e+09 +node_cpu_scaling_frequency_max_hertz{cpu="2"} 4.2e+09 +node_cpu_scaling_frequency_max_hertz{cpu="3"} 4.2e+09 +# HELP node_cpu_scaling_frequency_min_hertz Minimum scaled cpu thread frequency in hertz. +# TYPE node_cpu_scaling_frequency_min_hertz gauge +node_cpu_scaling_frequency_min_hertz{cpu="0"} 8e+08 +node_cpu_scaling_frequency_min_hertz{cpu="1"} 8e+08 +node_cpu_scaling_frequency_min_hertz{cpu="2"} 1e+06 +node_cpu_scaling_frequency_min_hertz{cpu="3"} 1e+06 # HELP node_cpu_seconds_total Seconds the cpus spent in each mode. # TYPE node_cpu_seconds_total counter node_cpu_seconds_total{cpu="0",mode="idle"} 10870.69