mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-23 21:26:36 +00:00
fix: windows_cpu_processor_utility_total is always 0 (#1966)
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
(cherry picked from commit 9db4318ea9)
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
@@ -31,6 +31,7 @@ func NewCounter(lastValue uint32) Counter {
|
||||
|
||||
func (c *Counter) AddValue(value uint32) {
|
||||
c.totalValue += float64(value - c.lastValue)
|
||||
c.lastValue = value
|
||||
}
|
||||
|
||||
func (c *Counter) Value() float64 {
|
||||
|
||||
Reference in New Issue
Block a user