mirror of
https://github.com/overleaf/overleaf.git
synced 2025-03-03 21:31:12 +00:00
add a metric for the TeXLive image used on each compile
This commit is contained in:
parent
7ab1654ebc
commit
ebcf9a75ae
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue