forked from DebaucheryLibrarian/traxxx
Added more detailed total runtime.
This commit is contained in:
parent
19121f5a3f
commit
edf1b64624
|
@ -8,7 +8,7 @@ const unprint = require('unprint');
|
||||||
// const log = require('why-is-node-running');
|
// const log = require('why-is-node-running');
|
||||||
const Inspector = require('inspector-api');
|
const Inspector = require('inspector-api');
|
||||||
const fs = require('fs').promises;
|
const fs = require('fs').promises;
|
||||||
const { format, formatDistanceStrict } = require('date-fns');
|
const { format, intervalToDuration } = require('date-fns');
|
||||||
|
|
||||||
const argv = require('./argv');
|
const argv = require('./argv');
|
||||||
const initServer = require('./web/server');
|
const initServer = require('./web/server');
|
||||||
|
@ -211,7 +211,10 @@ async function init() {
|
||||||
await associateMovieScenes(storedMovies, [...storedScenes, ...storedMovieScenes]);
|
await associateMovieScenes(storedMovies, [...storedScenes, ...storedMovieScenes]);
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.info(`Completed in ${formatDistanceStrict(new Date(), startTime)}`);
|
logger.info(`Completed in ${Object.entries(intervalToDuration({ start: startTime, end: Date.now() }))
|
||||||
|
.filter(([, value]) => value > 0)
|
||||||
|
.map(([key, value]) => `${value} ${key}`)
|
||||||
|
.join(', ')}`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.trace(error);
|
console.trace(error);
|
||||||
logger.error(error);
|
logger.error(error);
|
||||||
|
|
Loading…
Reference in New Issue