mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
added wait time total and reserved memory metrics
This commit is contained in:
@@ -102,7 +102,8 @@ func (r *Runner) queueHandler() {
|
||||
}
|
||||
|
||||
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 {
|
||||
// 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.ml.LogGauge(ctx, metricBaseName+"reserved_memory", int(r.usedMem))
|
||||
|
||||
if result.Status() == "success" {
|
||||
r.ml.LogCount(ctx, metricBaseName+"succeeded", 1)
|
||||
|
||||
Reference in New Issue
Block a user