mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-03-12 05:26:37 +00:00
move global Name Tables
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
@@ -123,9 +123,6 @@ import (
|
||||
// TODO: There's a LittleEndian field in the PERF header - we ought to check it
|
||||
var bo = binary.LittleEndian
|
||||
|
||||
var CounterNameTable NameTable
|
||||
var HelpNameTable NameTable
|
||||
|
||||
const averageCount64Type = 1073874176
|
||||
|
||||
// Top-level performance object (like "Process").
|
||||
@@ -263,16 +260,6 @@ func queryRawData(query string) ([]byte, error) {
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
// Initialize global name tables
|
||||
// TODO: profiling, add option to disable name tables if necessary
|
||||
// Not sure if we should resolve the names at all or just have the caller do it on demand
|
||||
// (for many use cases the index is sufficient)
|
||||
|
||||
CounterNameTable = *QueryNameTable("Counter 009")
|
||||
HelpNameTable = *QueryNameTable("Help 009")
|
||||
}
|
||||
|
||||
/*
|
||||
Query all performance counters that match a given query.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user