[misc] add timings for the sync stage and output stage

This commit is contained in:
Jakob Ackermann 2021-06-30 11:45:34 +01:00
parent 3185bdacf7
commit efa0c54ca5

View file

@ -114,7 +114,7 @@ module.exports = CompileManager = {
}, },
'written files to disk' 'written files to disk'
) )
timer.done() const syncStage = timer.done()
const injectDraftModeIfRequired = function (callback) { const injectDraftModeIfRequired = function (callback) {
if (request.draft) { if (request.draft) {
@ -295,6 +295,8 @@ module.exports = CompileManager = {
// Emit compile time. // Emit compile time.
timings.compile = ts timings.compile = ts
timer = new Metrics.Timer('process-output-files')
return OutputFileFinder.findOutputFiles( return OutputFileFinder.findOutputFiles(
resourceList, resourceList,
compileDir, compileDir,
@ -319,6 +321,10 @@ module.exports = CompileManager = {
) )
} }
const outputStage = timer.done()
timings.sync = syncStage
timings.output = outputStage
// Emit e2e compile time. // Emit e2e compile time.
timings.compileE2E = timerE2E.done() timings.compileE2E = timerE2E.done()