mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
fix windows performance counter father information failed on Non-English environment
This commit is contained in:
parent
9790262f12
commit
685c8f93d9
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user