chore: Replace Date.now with console.time

Co-authored-by: Alois Klink <alois@aloisklink.com>
This commit is contained in:
Sidharth Vinod 2023-08-14 00:40:48 +05:30
parent 170bbce0d3
commit 77a181978e
No known key found for this signature in database
GPG Key ID: FB5CCD378D3907CD

View File

@ -20,9 +20,9 @@ const zenumlCtx = await context(
const contexts = [mermaidCtx, mermaidIIFECtx, externalCtx, zenumlCtx];
const rebuildAll = async () => {
const time = Date.now();
console.time('Rebuild time');
await Promise.all(contexts.map((ctx) => ctx.rebuild()));
console.log('Rebuilt in' + (Date.now() - time) + 'ms');
console.timeEnd('Rebuild time');
};
let clients: { id: number; response: Response }[] = [];
@ -64,7 +64,7 @@ function sendEventsToAll() {
}
async function createServer() {
await rebuildAll();
handleFileChange();
const app = express();
chokidar
.watch('**/src/**/*.{js,ts,yaml,json}', {