mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
metrics: set summary unit
we have to use milleseconds since graphite doesnt support float64
This commit is contained in:
@@ -63,8 +63,8 @@ func (e *DefaultEvalHandler) Eval(context *EvalContext) {
|
||||
context.EndTime = time.Now()
|
||||
context.Rule.State = e.getNewState(context)
|
||||
|
||||
elapsedTime := context.EndTime.Sub(context.StartTime).Seconds()
|
||||
metrics.M_Alerting_Execution_Time.Observe(elapsedTime)
|
||||
elapsedTime := context.EndTime.Sub(context.StartTime).Nanoseconds() / int64(time.Millisecond)
|
||||
metrics.M_Alerting_Execution_Time.Observe(float64(elapsedTime))
|
||||
}
|
||||
|
||||
// This should be move into evalContext once its been refactored.
|
||||
|
||||
Reference in New Issue
Block a user