From 75c05f3d97827a55282452089a6f20c2279319a9 Mon Sep 17 00:00:00 2001 From: david Date: Fri, 17 Dec 2021 21:32:37 +0100 Subject: [PATCH] remove error from signature; update doc for function Signed-off-by: david --- collector/cpu_linux.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/collector/cpu_linux.go b/collector/cpu_linux.go index afc3a23c..a8089c31 100644 --- a/collector/cpu_linux.go +++ b/collector/cpu_linux.go @@ -304,14 +304,12 @@ func (c *cpuCollector) updateThermalThrottle(ch chan<- prometheus.Metric) error return nil } -// updateStat reads /proc/stat through procfs and exports CPU-related metrics. -func (c *cpuCollector) updateIsolated(ch chan<- prometheus.Metric) error { +// updateIsolated reads /sys/devices/system/cpu/isolated through sysfs and exports isolation level metrics. +func (c *cpuCollector) updateIsolated(ch chan<- prometheus.Metric) { for _, cpu := range c.isolatedCpus { cpuNum := strconv.Itoa(int(cpu)) ch <- prometheus.MustNewConstMetric(c.cpuIsolated, prometheus.GaugeValue, 1.0, cpuNum) } - - return nil } // updateStat reads /proc/stat through procfs and exports CPU-related metrics.