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(
buildTraceContext = rest.buildTraceContext
if (compilerDuration > 2) {
Log.event(
`Compiled successfully in ${Math.round(compilerDuration)}s`
)
let durationString
if (compilerDuration > 120) {
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 {
Log.event(
`Compiled successfully in ${Math.round(compilerDuration * 1000)}ms`
)
durationString = `${Math.round(compilerDuration * 1000)}ms`
}
Log.event(`Compiled successfully in ${durationString}`)
telemetry.record(
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