mirror of
https://github.com/prometheus-community/windows_exporter
synced 2025-03-23 03:17:42 +00:00
fix PercentTimeinGC metric
Signed-off-by: Max Trunov <trunov_ms@taximaxim.ru>
This commit is contained in:
parent
7f69cc0acf
commit
4e76e6938a
@ -144,6 +144,7 @@ type Win32_PerfRawData_NETFramework_NETCLRMemory struct {
|
||||
NumberTotalcommittedBytes uint64
|
||||
NumberTotalreservedBytes uint64
|
||||
PercentTimeinGC uint32
|
||||
PercentTimeinGC_base uint32
|
||||
ProcessID uint64
|
||||
PromotedFinalizationMemoryfromGen0 uint64
|
||||
PromotedMemoryfromGen0 uint64
|
||||
@ -294,7 +295,7 @@ func (c *NETFramework_NETCLRMemoryCollector) collect(ch chan<- prometheus.Metric
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.TimeinGC,
|
||||
prometheus.GaugeValue,
|
||||
float64(process.PercentTimeinGC)/float64(process.Frequency_PerfTime),
|
||||
float64(100*process.PercentTimeinGC)/float64(process.PercentTimeinGC_base),
|
||||
process.Name,
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user