Added diskdrive collector

To retrieve data from Win32_DiskDrive Object

Signed-off-by: sixfears7 <57415489+6fears7@users.noreply.github.com>
Signed-off-by: pgibbs1 <pgibbs1@liberty.edu>
This commit is contained in:
sixfears7
2022-11-16 12:11:10 -05:00
committed by pgibbs1
parent 6ddab61fa5
commit 653182a90c
2 changed files with 220 additions and 0 deletions

17
diskdrive_test.go Normal file
View File

@@ -0,0 +1,17 @@
package collector
import (
"testing"
)
func BenchmarkDiskDriveCollector(b *testing.B) {
benchmarkCollector(b, "disk_drive", newDiskDriveInfoCollector)
}
// goos: windows
// goarch: amd64
// pkg: github.com/prometheus-community/windows_exporter/collector
// cpu: Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
// BenchmarkDiskDriveCollector-8 1 1334272800 ns/op 41182008 B/op 125688 allocs/op
// PASS
// ok github.com/prometheus-community/windows_exporter/collector 4.943s