Skip to content

Commit

Permalink
Re-used sycn time and marker for async timing to avoid
Browse files Browse the repository at this point in the history
dead spots
  • Loading branch information
camillobruni committed Dec 17, 2024
1 parent e2e3c49 commit 9dc2601
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions resources/test-runner.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class TestRunner {
const testName = this.#test.name;
const syncStartLabel = `${suiteName}.${testName}-start`;
const syncEndLabel = `${suiteName}.${testName}-sync-end`;
const asyncStartLabel = `${suiteName}.${testName}-async-start`;
const asyncStartLabel = syncEndLabel;
const asyncEndLabel = `${suiteName}.${testName}-async-end`;

let syncTime;
Expand All @@ -47,9 +47,7 @@ export class TestRunner {
performance.mark(syncEndLabel);

syncTime = syncEndTime - syncStartTime;

performance.mark(asyncStartLabel);
asyncStartTime = performance.now();
asyncStartTime = syncEndTime;
};
const measureAsync = () => {
const bodyReference = this.#frame ? this.#frame.contentDocument.body : document.body;
Expand Down

0 comments on commit 9dc2601

Please sign in to comment.