From d2e4253e1eda3e45734576a3f7ee2321ac3e4fa5 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Tue, 10 May 2016 09:12:00 +0100 Subject: [PATCH] preserve existing metric name --- services/clsi/app/coffee/CompileManager.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/clsi/app/coffee/CompileManager.coffee b/services/clsi/app/coffee/CompileManager.coffee index 5c70c07e47..dc6c8337b0 100644 --- a/services/clsi/app/coffee/CompileManager.coffee +++ b/services/clsi/app/coffee/CompileManager.coffee @@ -54,8 +54,10 @@ module.exports = CompileManager = Metrics.gauge("load-avg", loadavg[0]) if loadavg? ts = timer.done() logger.log {project_id: request.project_id, time_taken: ts, stats:stats, timings:timings, loadavg:loadavg}, "done compile" + if stats?["latex-runs"] > 0 + Metrics.timing("run-compile-per-pass", ts / stats["latex-runs"]) if stats?["latex-runs"] > 0 and timings?["cpu-time"] > 0 - Metrics.timing("run-compile-per-pass", timings["cpu-time"] / stats["latex-runs"]) + Metrics.timing("run-compile-cpu-time-per-pass", timings["cpu-time"] / stats["latex-runs"]) OutputFileFinder.findOutputFiles request.resources, compileDir, (error, outputFiles) -> return callback(error) if error?