mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix timing script
This commit is contained in:
parent
ee27e3b5fe
commit
ec8468635b
@ -56,7 +56,7 @@ export const getRollupConfig = (config) => {
|
|||||||
if (config.logStartup) {
|
if (config.logStartup) {
|
||||||
options.output.intro += 'global._startTime = process.hrtime();'
|
options.output.intro += 'global._startTime = process.hrtime();'
|
||||||
// eslint-disable-next-line no-template-curly-in-string
|
// eslint-disable-next-line no-template-curly-in-string
|
||||||
options.output.outro += 'global._endTime = process.hrtime(global._startTime); global._coldstart = ((_endTime[0] * 1e9) + _endTime[1]) / 1e6; console.log(`λ Cold start took: ${global._coldstart}ms`);'
|
options.output.outro += 'global._endTime = process.hrtime(global._startTime); global._coldstart = ((global._endTime[0] * 1e9) + global._endTime[1]) / 1e6; console.log(`λ Cold start took: ${global._coldstart}ms`);'
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://github.com/rollup/plugins/tree/master/packages/replace
|
// https://github.com/rollup/plugins/tree/master/packages/replace
|
||||||
|
Loading…
Reference in New Issue
Block a user