Skip to content

Commit

Permalink
clearMarks and measures
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinGruber committed Jul 28, 2024
1 parent b859cca commit 3044bd9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/servers/SoeServer/soeserver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,15 @@ export class SOEServer extends EventEmitter {
this.avgEventLoopLag =
this.eventLoopLagValues.reduce((a, b) => a + b, 0) /
this.eventLoopLagValues.length;
performance.clearMarks();
performance.clearMeasures();
performance.mark("A");
});
obs.observe({ entryTypes: ["measure"], buffered: true });
performance.mark("A");
setInterval(() => {
performance.mark("B");
performance.measure("A to B", "A", "B");
performance.mark("A");
}, intervalTime);
} catch (e) {
console.log("PerformanceObserver not available");
Expand Down

0 comments on commit 3044bd9

Please sign in to comment.