Merge pull request #106644 from ahrtr/add_info_counter_perfcounter

Add more info when failing to call PdhAddEnglishCounter
This commit is contained in:
Kubernetes Prow Robot
2022-01-06 06:45:01 -08:00
committed by GitHub

View File

@@ -57,7 +57,7 @@ func newPerfCounter(counter string) (*perfCounter, error) {
ret = win_pdh.PdhAddEnglishCounter(queryHandle, counter, 0, &counterHandle)
if ret != win_pdh.ERROR_SUCCESS {
return nil, fmt.Errorf("unable to add process counter. Error code is %x", ret)
return nil, fmt.Errorf("unable to add process counter: %s. Error code is %x", counter, ret)
}
ret = win_pdh.PdhCollectQueryData(queryHandle)