Skip to content

Commit

Permalink
remove error from signature; update doc for function
Browse files Browse the repository at this point in the history
Signed-off-by: david <davidventura27@gmail.com>
  • Loading branch information
DavidVentura committed Jul 26, 2022
1 parent 840d326 commit 75c05f3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions collector/cpu_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 75c05f3

Please sign in to comment.