Skip to content

Commit

Permalink
measure
Browse files Browse the repository at this point in the history
  • Loading branch information
ledyba committed May 10, 2022
1 parent c0f7c85 commit 21cf18e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/src/cmd/regenerate-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ async function main() {
let processed = 0;
for (const entity of entities) {
console.log(`[${entity.mimeType} ${processed+1}/${entities.length})]: ${entity.id}`);
const beg = performance.now();
await shelf.regenerateEntityCache(entity);
++processed;
const end = performance.now();
console.log(`${(beg-end).toPrecision(2)}ms elapsed.`);
}
} finally {
await repo.close();
Expand Down

0 comments on commit 21cf18e

Please sign in to comment.