feat(alerting): add global usage metrics for alerting

closes #5786
This commit is contained in:
bergquist
2016-08-11 21:12:46 +02:00
parent ae15de119f
commit 937726499f
8 changed files with 66 additions and 24 deletions
+3 -4
View File
@@ -5,10 +5,7 @@ import (
"time"
"github.com/grafana/grafana/pkg/log"
)
var (
descriptionFmt = "Actual value: %1.2f for %s. "
"github.com/grafana/grafana/pkg/metrics"
)
type DefaultEvalHandler struct {
@@ -55,5 +52,7 @@ func (e *DefaultEvalHandler) eval(context *EvalContext) {
}
context.EndTime = time.Now()
elapsedTime := context.EndTime.Sub(context.StartTime)
metrics.M_Alerting_Exeuction_Time.Update(elapsedTime)
context.DoneChan <- true
}