mirror of
https://github.com/prometheus/prometheus
synced 2024-12-25 07:52:28 +00:00
Log WAL replay duration
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
This commit is contained in:
parent
a128fc3534
commit
2cc32c332d
@ -588,6 +588,7 @@ func (h *Head) Init(minValidTime int64) error {
|
||||
}
|
||||
|
||||
level.Info(h.logger).Log("msg", "replaying WAL, this may take awhile")
|
||||
start := time.Now()
|
||||
// Backfill the checkpoint first if it exists.
|
||||
dir, startFrom, err := wal.LastCheckpoint(h.wal.Dir())
|
||||
if err != nil && err != record.ErrNotFound {
|
||||
@ -638,6 +639,8 @@ func (h *Head) Init(minValidTime int64) error {
|
||||
level.Info(h.logger).Log("msg", "WAL segment loaded", "segment", i, "maxSegment", last)
|
||||
}
|
||||
|
||||
level.Info(h.logger).Log("msg", "WAL replay completed", "duration", time.Since(start).String())
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user