From 834668b03365c9f9d2254441cd5240f94d57aff5 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Mon, 9 May 2016 15:36:11 +0100 Subject: [PATCH] add a metric for the TeXLive image used on each compile --- app/coffee/CompileManager.coffee | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/coffee/CompileManager.coffee b/app/coffee/CompileManager.coffee index 6f71c32..ca84303 100644 --- a/app/coffee/CompileManager.coffee +++ b/app/coffee/CompileManager.coffee @@ -32,7 +32,11 @@ module.exports = CompileManager = injectDraftModeIfRequired (error) -> return callback(error) if error? timer = new Metrics.Timer("run-compile") + # find the image tag to log it as a metric + tag = request.imageName?.match(/:(.*)/)?[1] or "default" + tag = "other" if project_id?.match(/^[0-9a-f]{24}$/) # exclude smoke test Metrics.inc("compiles") + Metrics.inc("compiles-with-image.#{tag}") LatexRunner.runLatex request.project_id, { directory: compileDir mainFile: request.rootResourcePath