mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-10-29 23:19:04 +01:00
pdh: convert all raw time counter types to seconds (#2776)
Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude
parent
a9d5bbef48
commit
da7bebc6b3
@@ -205,19 +205,20 @@ func (c *Collector) publishVirtualStorageDevice(ch chan<- prometheus.Metric, scr
|
||||
data.Name,
|
||||
)
|
||||
|
||||
// The raw value of a PERF_AVERAGE_TIMER counter is the sum of all IO latencies in
|
||||
// 100ns ticks; the operation count it is averaged over is Throughput.
|
||||
// The value of a PERF_AVERAGE_TIMER counter is the sum of all IO latencies,
|
||||
// converted to seconds by internal/pdh; the operation count it is averaged
|
||||
// over is Throughput.
|
||||
ch <- scrape.MustNewConstMetric(
|
||||
c.virtualStorageDeviceIOLatency,
|
||||
prometheus.CounterValue,
|
||||
data.VirtualStorageDeviceLatency*pdh.TicksToSecondScaleFactor,
|
||||
data.VirtualStorageDeviceLatency,
|
||||
data.Name,
|
||||
)
|
||||
|
||||
ch <- scrape.MustNewConstMetric(
|
||||
c.virtualStorageDeviceLowerIOLatency,
|
||||
prometheus.CounterValue,
|
||||
data.VirtualStorageDeviceLowerLatency*pdh.TicksToSecondScaleFactor,
|
||||
data.VirtualStorageDeviceLowerLatency,
|
||||
data.Name,
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user