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"
"time"
@@ -45,7 +46,7 @@ func TestCollector(t *testing.T) {
t.Run(tc.object, func(t *testing.T) {
t.Parallel()
performanceData, err := pdh.NewCollector[process](pdh.CounterTypeRaw, tc.object, tc.instances)
performanceData, err := pdh.NewCollector[process](slog.New(slog.DiscardHandler), pdh.CounterTypeRaw, tc.object, tc.instances)
require.NoError(t, err)
time.Sleep(100 * time.Millisecond)