Unverified Commit fccaa8e2 authored by Tim Neutkens's avatar Tim Neutkens Committed by GitHub

Fix initial compile timing incorrect measurment (#31733)

Co-authored-by: 's avatarTobias Koppers <1365881+sokra@users.noreply.github.com>
Co-authored-by: 's avatarkodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
parent 226944d3
...@@ -107,10 +107,7 @@ let serverWebWasLoading = false ...@@ -107,10 +107,7 @@ let serverWebWasLoading = false
buildStore.subscribe((state) => { buildStore.subscribe((state) => {
const { amp, client, server, serverWeb, trigger } = state const { amp, client, server, serverWeb, trigger } = state
const { bootstrap: bootstrapping, appUrl } = consoleStore.getState() const { appUrl } = consoleStore.getState()
if (bootstrapping && (client.loading || server.loading)) {
return
}
if (client.loading || server.loading || serverWeb?.loading) { if (client.loading || server.loading || serverWeb?.loading) {
consoleStore.setState( consoleStore.setState(
......
...@@ -56,17 +56,20 @@ store.subscribe((state) => { ...@@ -56,17 +56,20 @@ store.subscribe((state) => {
if (state.appUrl) { if (state.appUrl) {
Log.ready(`started server on ${state.bindAddr}, url: ${state.appUrl}`) Log.ready(`started server on ${state.bindAddr}, url: ${state.appUrl}`)
} }
if (startTime === 0) startTime = Date.now()
return return
} }
if (state.loading) { if (state.loading) {
if (state.trigger) { if (state.trigger) {
Log.wait(`compiling ${state.trigger}...`) if (state.trigger !== 'initial') {
Log.wait(`compiling ${state.trigger}...`)
}
} else { } else {
Log.wait('compiling...') Log.wait('compiling...')
} }
if (startTime === 0) startTime = Date.now() if (startTime === 0) {
startTime = Date.now()
}
return return
} }
......
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