mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-03-05 18:16:35 +00:00
@@ -127,7 +127,9 @@ const averageCount64Type = 1073874176
|
|||||||
|
|
||||||
// PerfObject Top-level performance object (like "Process").
|
// PerfObject Top-level performance object (like "Process").
|
||||||
type PerfObject struct {
|
type PerfObject struct {
|
||||||
Name string
|
Name string
|
||||||
|
// NameIndex Same index you pass to QueryPerformanceData
|
||||||
|
NameIndex uint
|
||||||
Instances []*PerfInstance
|
Instances []*PerfInstance
|
||||||
CounterDefs []*PerfCounterDef
|
CounterDefs []*PerfCounterDef
|
||||||
|
|
||||||
@@ -148,7 +150,8 @@ type PerfInstance struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type PerfCounterDef struct {
|
type PerfCounterDef struct {
|
||||||
Name string
|
Name string
|
||||||
|
NameIndex uint
|
||||||
|
|
||||||
// For debugging - subject to removal. CounterType is a perflib
|
// For debugging - subject to removal. CounterType is a perflib
|
||||||
// implementation detail (see perflib.h) and should not be used outside
|
// implementation detail (see perflib.h) and should not be used outside
|
||||||
@@ -321,6 +324,7 @@ func QueryPerformanceData(query string) ([]*PerfObject, error) {
|
|||||||
|
|
||||||
objects[i] = &PerfObject{
|
objects[i] = &PerfObject{
|
||||||
Name: obj.LookupName(),
|
Name: obj.LookupName(),
|
||||||
|
NameIndex: uint(obj.ObjectNameTitleIndex),
|
||||||
Instances: instances,
|
Instances: instances,
|
||||||
CounterDefs: counterDefs,
|
CounterDefs: counterDefs,
|
||||||
Frequency: obj.PerfFreq,
|
Frequency: obj.PerfFreq,
|
||||||
@@ -335,8 +339,9 @@ func QueryPerformanceData(query string) ([]*PerfObject, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
counterDefs[i] = &PerfCounterDef{
|
counterDefs[i] = &PerfCounterDef{
|
||||||
Name: def.LookupName(),
|
Name: def.LookupName(),
|
||||||
rawData: def,
|
NameIndex: uint(def.CounterNameTitleIndex),
|
||||||
|
rawData: def,
|
||||||
|
|
||||||
CounterType: def.CounterType,
|
CounterType: def.CounterType,
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user