Skip to content

Commit

Permalink
fix: update name of span if passed to .measure
Browse files Browse the repository at this point in the history
  • Loading branch information
Drevoed committed Nov 10, 2021
1 parent 223f762 commit 9433af9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/shared/lib/measure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export function measurement(name: string, commonLog = console.log) {
measure(log = commonLog, text = name) {
const difference = performance.now() - timeStart;
log(`[PERF] ${text} for %sms`, difference.toFixed(2));
span.updateName(text);
span.end();
return difference;
},
Expand Down

0 comments on commit 9433af9

Please sign in to comment.