mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Merge pull request #84156 from wawa0210/win-performance-counter
Fix windows performance counter error on Non-English environemnt
This commit is contained in:
commit
6d314f860e
@ -54,11 +54,6 @@ func newPerfCounter(counter string) (*perfCounter, error) {
|
|||||||
return nil, errors.New("unable to open query through DLL call")
|
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)
|
ret = win_pdh.PdhAddEnglishCounter(queryHandle, counter, 0, &counterHandle)
|
||||||
if ret != win_pdh.ERROR_SUCCESS {
|
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. Error code is %x", ret)
|
||||||
|
Loading…
Reference in New Issue
Block a user