mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
Merge pull request #28909 from overleaf/em-compile-metrics
Use histograms to track CLSI compile times GitOrigin-RevId: cf25f1e6d2094186f419acc70748f0c71b6c3240
This commit is contained in:
@@ -2,6 +2,7 @@ const Path = require('node:path')
|
||||
const SandboxedModule = require('sandboxed-module')
|
||||
const { expect } = require('chai')
|
||||
const sinon = require('sinon')
|
||||
const Metrics = require('../../../app/js/Metrics')
|
||||
|
||||
const MODULE_PATH = require('node:path').join(
|
||||
__dirname,
|
||||
@@ -177,6 +178,7 @@ describe('CompileManager', function () {
|
||||
'./CLSICacheHandler': this.CLSICacheHandler,
|
||||
'./LatexMetrics': this.LatexMetrics,
|
||||
'./StatsManager': this.StatsManager,
|
||||
'./Metrics': Metrics,
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
@@ -51,7 +51,7 @@ describe('DockerRunner', function () {
|
||||
},
|
||||
}),
|
||||
}),
|
||||
'./Metrics': {
|
||||
'@overleaf/metrics': {
|
||||
Timer: (Timer = class Timer {
|
||||
done() {}
|
||||
}),
|
||||
|
||||
@@ -27,7 +27,7 @@ describe('OutputFileOptimiser', function () {
|
||||
fs: (this.fs = {}),
|
||||
path: (this.Path = {}),
|
||||
child_process: { spawn: (this.spawn = sinon.stub()) },
|
||||
'./Metrics': {},
|
||||
'@overleaf/metrics': {},
|
||||
},
|
||||
globals: { Math }, // used by lodash
|
||||
})
|
||||
|
||||
@@ -34,7 +34,7 @@ describe('ResourceWriter', function () {
|
||||
createProjectDir: sinon.stub().yields(),
|
||||
}),
|
||||
'./OutputFileFinder': (this.OutputFileFinder = {}),
|
||||
'./Metrics': (this.Metrics = {
|
||||
'@overleaf/metrics': (this.Metrics = {
|
||||
inc: sinon.stub(),
|
||||
Timer: (Timer = (function () {
|
||||
Timer = class Timer {
|
||||
|
||||
Reference in New Issue
Block a user