perf test

mochawesome
John McLear 2021-01-26 16:50:04 +00:00
parent 48ebc3af5a
commit 45d54ca874
1 changed files with 3 additions and 3 deletions

View File

@ -62,10 +62,10 @@ exports.start = async () => {
// Performance stats gauges
// We use gauges because a reload might replace the value
stats.gauge('npmLoadDuration', () => postNpmLoad);
const preNpmLoad = Date.now() - stats.startTime;
stats.gauge('npmLoadDuration', () => npmLoadDuration);
const preNpmLoad = Date.now();
await util.promisify(npm.load)();
const npmLoadDuration = Date.now() - stats.startTime;
const npmLoadDuration = Date.now() - preNpmLoad;
try {
stats.gauge('dbInitDuration', () => dbInitDuration);