提交 787eb1e9 编写于 作者: G Ganesh Vernekar 提交者: Goutham Veeramachaneni

Set rule_group_last_duration_seconds to seconds (#5153)

Signed-off-by: NGanesh Vernekar <cs15btech11018@iith.ac.in>
上级 410ee9e0
...@@ -369,7 +369,7 @@ func (g *Group) GetEvaluationDuration() time.Duration { ...@@ -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()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册