Unverified Commit 402edf9f authored by Tobias Koppers's avatar Tobias Koppers Committed by GitHub

more detailed time display (#71248)

### What?

It was rounding a bit too much to be useful
parent 18e16185
...@@ -1688,15 +1688,17 @@ export default async function build( ...@@ -1688,15 +1688,17 @@ export default async function build(
buildTraceContext = rest.buildTraceContext buildTraceContext = rest.buildTraceContext
if (compilerDuration > 2) { let durationString
Log.event( if (compilerDuration > 120) {
`Compiled successfully in ${Math.round(compilerDuration)}s` durationString = `${Math.round(compilerDuration / 6) / 10}min`
) } else if (compilerDuration > 20) {
durationString = `${Math.round(compilerDuration)}s`
} else if (compilerDuration > 2) {
durationString = `${Math.round(compilerDuration * 10) / 10}s`
} else { } else {
Log.event( durationString = `${Math.round(compilerDuration * 1000)}ms`
`Compiled successfully in ${Math.round(compilerDuration * 1000)}ms`
)
} }
Log.event(`Compiled successfully in ${durationString}`)
telemetry.record( telemetry.record(
eventBuildCompleted(pagesPaths, { eventBuildCompleted(pagesPaths, {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment