Fixed bug that you cannot gather data on non english systems (#1944)

This commit is contained in:
Da1den 2016-12-13 15:24:41 +01:00 committed by Cameron Sparr
parent 4a0f3a7100
commit 3e2296541a
1 changed files with 1 additions and 5 deletions

View File

@ -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,