mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 13:13:45 -05:00
Merge pull request #6959 from overleaf/jpa-clsi-zero-bucket
[clsi] add zero bucket and collect histogram data in timing as well GitOrigin-RevId: 6390f1c213e4850ceb629dae1e6406f6077759aa
This commit is contained in:
parent
e9a4ae027d
commit
a3e85f5357
1 changed files with 15 additions and 3 deletions
|
@ -22,7 +22,7 @@ const SynctexOutputParser = require('./SynctexOutputParser')
|
||||||
const COMPILE_TIME_BUCKETS = [
|
const COMPILE_TIME_BUCKETS = [
|
||||||
// NOTE: These buckets are locked in per metric name.
|
// NOTE: These buckets are locked in per metric name.
|
||||||
// If you want to change them, you will need to rename metrics.
|
// If you want to change them, you will need to rename metrics.
|
||||||
1, 2, 3, 4, 6, 8, 11, 15, 22, 31, 43, 61, 86, 121, 170, 240,
|
0, 1, 2, 3, 4, 6, 8, 11, 15, 22, 31, 43, 61, 86, 121, 170, 240,
|
||||||
].map(seconds => seconds * 1000)
|
].map(seconds => seconds * 1000)
|
||||||
|
|
||||||
function getCompileName(projectId, userId) {
|
function getCompileName(projectId, userId) {
|
||||||
|
@ -63,7 +63,7 @@ function doCompile(request, callback) {
|
||||||
const outputDir = getOutputDir(request.project_id, request.user_id)
|
const outputDir = getOutputDir(request.project_id, request.user_id)
|
||||||
|
|
||||||
const timerE2E = new Metrics.Timer(
|
const timerE2E = new Metrics.Timer(
|
||||||
'compile-e2e',
|
'compile-e2e-v2',
|
||||||
1,
|
1,
|
||||||
request.metricsOpts,
|
request.metricsOpts,
|
||||||
COMPILE_TIME_BUCKETS
|
COMPILE_TIME_BUCKETS
|
||||||
|
@ -270,11 +270,17 @@ function doCompile(request, callback) {
|
||||||
)
|
)
|
||||||
if (stats['latex-runs'] > 0) {
|
if (stats['latex-runs'] > 0) {
|
||||||
Metrics.histogram(
|
Metrics.histogram(
|
||||||
'avg-compile-per-pass',
|
'avg-compile-per-pass-v2',
|
||||||
ts / stats['latex-runs'],
|
ts / stats['latex-runs'],
|
||||||
COMPILE_TIME_BUCKETS,
|
COMPILE_TIME_BUCKETS,
|
||||||
request.metricsOpts
|
request.metricsOpts
|
||||||
)
|
)
|
||||||
|
Metrics.timing(
|
||||||
|
'avg-compile-per-pass-v2',
|
||||||
|
ts / stats['latex-runs'],
|
||||||
|
1,
|
||||||
|
request.metricsOpts
|
||||||
|
)
|
||||||
}
|
}
|
||||||
if (stats['latex-runs'] > 0 && timings['cpu-time'] > 0) {
|
if (stats['latex-runs'] > 0 && timings['cpu-time'] > 0) {
|
||||||
Metrics.timing(
|
Metrics.timing(
|
||||||
|
@ -321,6 +327,12 @@ function doCompile(request, callback) {
|
||||||
|
|
||||||
// Emit e2e compile time.
|
// Emit e2e compile time.
|
||||||
timings.compileE2E = timerE2E.done()
|
timings.compileE2E = timerE2E.done()
|
||||||
|
Metrics.timing(
|
||||||
|
'compile-e2e-v2',
|
||||||
|
timings.compileE2E,
|
||||||
|
1,
|
||||||
|
request.metricsOpts
|
||||||
|
)
|
||||||
|
|
||||||
if (stats['pdf-size']) {
|
if (stats['pdf-size']) {
|
||||||
emitPdfStats(stats, timings, request)
|
emitPdfStats(stats, timings, request)
|
||||||
|
|
Loading…
Reference in a new issue