[v10.0.x] Alerting: Add duration to saving alert states done (#70875)
Alerting: Add duration to saving alert states done (#70844)
(cherry picked from commit 594c851d4b)
Co-authored-by: George Robinson <george.robinson@grafana.com>
This commit is contained in:
co-authored by
George Robinson
parent
30255fd4bd
commit
ad5ffd7ed3
@@ -385,9 +385,10 @@ func (st *Manager) saveAlertStates(ctx context.Context, logger log.Logger, state
|
||||
return nil
|
||||
}
|
||||
|
||||
start := time.Now()
|
||||
logger.Debug("Saving alert states", "count", len(states), "max_state_save_concurrency", st.maxStateSaveConcurrency)
|
||||
_ = concurrency.ForEachJob(ctx, len(states), st.maxStateSaveConcurrency, saveState)
|
||||
logger.Debug("Saving alert states done", "count", len(states), "max_state_save_concurrency", st.maxStateSaveConcurrency)
|
||||
logger.Debug("Saving alert states done", "count", len(states), "max_state_save_concurrency", st.maxStateSaveConcurrency, "duration", time.Since(start))
|
||||
}
|
||||
|
||||
func (st *Manager) deleteAlertStates(ctx context.Context, logger log.Logger, states []StateTransition) {
|
||||
|
||||
Reference in New Issue
Block a user