Skip to content

Commit

Permalink
count up total time
Browse files Browse the repository at this point in the history
  • Loading branch information
ledyba committed May 10, 2022
1 parent f1765f2 commit 5380c5b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/src/cmd/regenerate-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Shelf from '../shelf/Shelf.js';
import { Entity } from '../shelf/Entity.js'

async function main() {
const started = performance.now();
console.log('** Regenerating entity cache **');
const repo = new Repo();
const shelf = new Shelf(repo);
Expand All @@ -19,7 +20,7 @@ async function main() {
await shelf.regenerateEntityCache(entity);
++processed;
const end = performance.now();
console.log(` -> Done: ${((end-beg)/1000).toPrecision(2)}sec elapsed.`);
console.log(` -> Done in ${((end-beg)/1000).toPrecision(2)}sec (total: ${((end-start)/1000).toPrecision(2)}sec)`);
}
} finally {
await repo.close();
Expand Down

0 comments on commit 5380c5b

Please sign in to comment.