mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 13:44:05 -08:00
Set rule_group_last_duration_seconds to seconds (#5153)
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
This commit is contained in:
parent
410ee9e04a
commit
787eb1e904
|
@ -369,7 +369,7 @@ func (g *Group) GetEvaluationDuration() time.Duration {
|
||||||
|
|
||||||
// setEvaluationDuration sets the time in seconds the last evaluation took.
|
// setEvaluationDuration sets the time in seconds the last evaluation took.
|
||||||
func (g *Group) setEvaluationDuration(dur time.Duration) {
|
func (g *Group) setEvaluationDuration(dur time.Duration) {
|
||||||
g.metrics.groupLastDuration.WithLabelValues(groupKey(g.file, g.name)).Set(float64(dur))
|
g.metrics.groupLastDuration.WithLabelValues(groupKey(g.file, g.name)).Set(dur.Seconds())
|
||||||
|
|
||||||
g.mtx.Lock()
|
g.mtx.Lock()
|
||||||
defer g.mtx.Unlock()
|
defer g.mtx.Unlock()
|
||||||
|
|
Loading…
Reference in a new issue