Fixed bug that you cannot gather data on non english systems (#1944)
This commit is contained in:
parent
4a0f3a7100
commit
3e2296541a
|
@ -116,11 +116,7 @@ func (m *Win_PerfCounters) AddItem(metrics *itemList, query string, objectName s
|
||||||
var handle win.PDH_HQUERY
|
var handle win.PDH_HQUERY
|
||||||
var counterHandle win.PDH_HCOUNTER
|
var counterHandle win.PDH_HCOUNTER
|
||||||
ret := win.PdhOpenQuery(0, 0, &handle)
|
ret := win.PdhOpenQuery(0, 0, &handle)
|
||||||
if m.PreVistaSupport {
|
|
||||||
ret = win.PdhAddCounter(handle, query, 0, &counterHandle)
|
ret = win.PdhAddCounter(handle, query, 0, &counterHandle)
|
||||||
} else {
|
|
||||||
ret = win.PdhAddEnglishCounter(handle, query, 0, &counterHandle)
|
|
||||||
}
|
|
||||||
_ = ret
|
_ = ret
|
||||||
|
|
||||||
temp := &item{query, objectName, counter, instance, measurement,
|
temp := &item{query, objectName, counter, instance, measurement,
|
||||||
|
|
Loading…
Reference in New Issue