mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-03-05 18:16:35 +00:00
Implement Lazy Loading of NameTable
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
committed by
Jan-Otto Kröpke
parent
9b5bc37a42
commit
11218a95d0
@@ -12,10 +12,8 @@ import (
|
||||
"github.com/go-kit/log/level"
|
||||
)
|
||||
|
||||
var nametable = perflib.CounterNameTable
|
||||
|
||||
func MapCounterToIndex(name string) string {
|
||||
return strconv.Itoa(int(nametable.LookupIndex(name)))
|
||||
return strconv.Itoa(int(perflib.CounterNameTable.LookupIndex(name)))
|
||||
}
|
||||
|
||||
func getPerflibSnapshot(objNames string) (map[string]*perflib.PerfObject, error) {
|
||||
|
||||
Reference in New Issue
Block a user