Skip to content

Commit

Permalink
Merge pull request #281 from adjust/add_gc_cpu_fraction
Browse files Browse the repository at this point in the history
Adding GCCPUFraction metric to goCollector
  • Loading branch information
beorn7 authored Apr 1, 2017
2 parents 738ed6c + 56cf0be commit 08fd2e1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions prometheus/go_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,14 @@ func NewGoCollector() Collector {
),
eval: func(ms *runtime.MemStats) float64 { return float64(ms.LastGC) / 1e9 },
valType: GaugeValue,
}, {
desc: NewDesc(
memstatNamespace("gc_cpu_fraction"),
"The fraction of this program's available CPU time used by the GC since the program started.",
nil, nil,
),
eval: func(ms *runtime.MemStats) float64 { return ms.GCCPUFraction },
valType: GaugeValue,
},
},
}
Expand Down

0 comments on commit 08fd2e1

Please sign in to comment.