fix windows performance counter father information failed on Non-English environment

This commit is contained in:
xiaozhang 2019-10-21 19:49:13 +08:00
parent 9790262f12
commit 685c8f93d9

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)