MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / Update

Method Update

metric/cpu_linux.go:80–85  ·  view source on GitHub ↗

Update implements Collector and exposes cpu related metrics from /proc/stat and /sys/.../cpu/.

(ch chan<- prometheus.Metric)

Source from the content-addressed store, hash-verified

78
79// Update implements Collector and exposes cpu related metrics from /proc/stat and /sys/.../cpu/.
80func (c *cpuCollector) Update(ch chan<- prometheus.Metric) error {
81 if err := c.updateStat(ch); err != nil {
82 return err
83 }
84 return c.updateCPUfreq(ch)
85}
86
87// updateCPUfreq reads /sys/devices/system/cpu/cpu* and expose cpu frequency statistics.
88func (c *cpuCollector) updateCPUfreq(ch chan<- prometheus.Metric) error {

Callers

nothing calls this directly

Calls 2

updateStatMethod · 0.95
updateCPUfreqMethod · 0.95

Tested by

no test coverage detected