added wait time total and reserved memory metrics

This commit is contained in:
Henrique Chehad
2016-09-21 20:25:37 -03:00
parent ef53279f9b
commit 6b910d0b75

View File

@@ -102,7 +102,8 @@ func (r *Runner) queueHandler() {
} }
metricBaseName := fmt.Sprintf("run.%s.", task.cfg.AppName) metricBaseName := fmt.Sprintf("run.%s.", task.cfg.AppName)
r.ml.LogTime(task.ctx, metricBaseName+"waittime", waitTime) r.ml.LogTime(task.ctx, metricBaseName+"wait_time", waitTime)
r.ml.LogTime(task.ctx, "run.wait_time", waitTime)
if timedOut { if timedOut {
// Send to a signal to this task saying it cannot run // Send to a signal to this task saying it cannot run
@@ -198,6 +199,7 @@ func (r *Runner) Run(ctx context.Context, cfg *Config) (drivers.RunResult, error
} }
r.addUsedMem(-1 * int64(cfg.Memory)) r.addUsedMem(-1 * int64(cfg.Memory))
r.ml.LogGauge(ctx, metricBaseName+"reserved_memory", int(r.usedMem))
if result.Status() == "success" { if result.Status() == "success" {
r.ml.LogCount(ctx, metricBaseName+"succeeded", 1) r.ml.LogCount(ctx, metricBaseName+"succeeded", 1)