Merge pull request #84156 from wawa0210/win-performance-counter

Fix windows performance counter error on Non-English environemnt
This commit is contained in:
Kubernetes Prow Robot 2019-10-22 20:10:24 -07:00 committed by GitHub
commit 6d314f860e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,11 +54,6 @@ func newPerfCounter(counter string) (*perfCounter, error) {
return nil, errors.New("unable to open query through DLL call")
}
ret = win_pdh.PdhValidatePath(counter)
if ret != win_pdh.ERROR_SUCCESS {
return nil, fmt.Errorf("unable to valid path to counter. Error code is %x", ret)
}
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)