pdh: added logging, if PDH CStatus is not valid (#2203)

This commit is contained in:
Jan-Otto Kröpke
2025-09-07 13:31:29 +02:00
committed by GitHub
parent fcf21bb600
commit f1772a742f
76 changed files with 132 additions and 116 deletions

View File

@@ -18,6 +18,7 @@
package pdh_test
import (
"log/slog"
"testing"
"github.com/prometheus-community/windows_exporter/internal/pdh"
@@ -58,7 +59,7 @@ type processFull struct {
}
func BenchmarkTestCollector(b *testing.B) {
performanceData, err := pdh.NewCollector[processFull](pdh.CounterTypeRaw, "Process", []string{"*"})
performanceData, err := pdh.NewCollector[processFull](slog.New(slog.DiscardHandler), pdh.CounterTypeRaw, "Process", []string{"*"})
require.NoError(b, err)
var data []processFull