mirror of
https://github.com/prometheus/prometheus
synced 2025-04-01 22:59:03 +00:00
Change variable name to restoreStartTime
from now
and introduce a log line to record total time
Signed-off-by: gotjosh <josue.abreu@gmail.com>
This commit is contained in:
parent
e7219e3d36
commit
381a77ac1e
@ -230,9 +230,11 @@ func (g *Group) run(ctx context.Context) {
|
|||||||
g.evalIterationFunc(ctx, g, evalTimestamp)
|
g.evalIterationFunc(ctx, g, evalTimestamp)
|
||||||
}
|
}
|
||||||
|
|
||||||
now := time.Now()
|
restoreStartTime := time.Now()
|
||||||
g.RestoreForState(now)
|
g.RestoreForState(restoreStartTime)
|
||||||
g.metrics.GroupLastRestoreDuration.WithLabelValues(GroupKey(g.file, g.name)).Set(time.Since(now).Seconds())
|
totalRestoreTimeSeconds := time.Since(restoreStartTime).Seconds()
|
||||||
|
g.metrics.GroupLastRestoreDuration.WithLabelValues(GroupKey(g.file, g.name)).Set(totalRestoreTimeSeconds)
|
||||||
|
level.Debug(g.logger).Log("msg", "'for' state restoration completed", "duration_seconds", totalRestoreTimeSeconds)
|
||||||
g.shouldRestore = false
|
g.shouldRestore = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user