Skip to content

Commit

Permalink
chrome 125 results, remove 0 waits
Browse files Browse the repository at this point in the history
  • Loading branch information
krausest committed May 18, 2024
1 parent 895be5d commit 3faf4a3
Show file tree
Hide file tree
Showing 6 changed files with 219 additions and 230 deletions.
2 changes: 1 addition & 1 deletion webdriver-ts-results/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const App = () => {

const testEnvironmentInfo = (
<p>
The benchmark was run on a MacBook Pro 14 (32 GB RAM, 8/14 Cores, OSX 14.4), Chrome for Testing 124.0.6367.91
The benchmark was run on a MacBook Pro 14 (32 GB RAM, 8/14 Cores, OSX 14.4), Chrome for Testing 125.0.6422.60
(arm64) using the puppeteer benchmark driver with reduced tracing.
</p>
);
Expand Down
431 changes: 216 additions & 215 deletions webdriver-ts-results/src/results.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion webdriver-ts/results.json

Large diffs are not rendered by default.

7 changes: 1 addition & 6 deletions webdriver-ts/src/benchmarksPuppeteer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
BenchmarkImpl,
MemBenchmarkInfo,
} from "./benchmarksCommon.js";
import { config, FrameworkData, puppeteerWait } from "./common.js";
import { config, FrameworkData } from "./common.js";
import {
checkCountForSelector,
checkElementContainsText,
Expand Down Expand Up @@ -44,14 +44,12 @@ export let benchRun = new (class extends CPUBenchmarkPuppeteer {
await checkElementExists(page, "pierce/#run");
for (let i = 0; i < this.benchmarkInfo.warmupCount; i++) {
await clickElement(page, "pierce/#run");
await puppeteerWait();
await checkElementContainsText(
page,
"pierce/tbody>tr:nth-of-type(1)>td:nth-of-type(1)",
(i * 1000 + 1).toFixed()
);
await clickElement(page, "pierce/#clear");
await puppeteerWait();
await checkElementNotExists(page, "pierce/tbody>tr:nth-of-type(1000)>td:nth-of-type(1)");
}
}
Expand All @@ -73,7 +71,6 @@ export const benchReplaceAll = new (class extends CPUBenchmarkPuppeteer {
await checkElementExists(page, "pierce/#run");
for (let i = 0; i < this.benchmarkInfo.warmupCount; i++) {
await clickElement(page, "pierce/#run");
await puppeteerWait();
await checkElementContainsText(
page,
"pierce/tbody>tr:nth-of-type(1)>td:nth-of-type(1)",
Expand Down Expand Up @@ -228,14 +225,12 @@ export const benchRunBig = new (class extends CPUBenchmarkPuppeteer {
await checkElementExists(page, "pierce/#run");
for (let i = 0; i < this.benchmarkInfo.warmupCount; i++) {
await clickElement(page, "pierce/#run");
await puppeteerWait();
await checkElementContainsText(
page,
"pierce/tbody>tr:nth-of-type(1)>td:nth-of-type(1)",
(i * 1000 + 1).toFixed()
);
await clickElement(page, "pierce/#clear");
await puppeteerWait();
await checkElementNotExists(page, "pierce/tbody>tr:nth-of-type(1000)>td:nth-of-type(1)");
}
}
Expand Down
1 change: 0 additions & 1 deletion webdriver-ts/src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,4 +179,3 @@ export const wait = (delay = 1000) => {
else return new Promise((res) => setTimeout(res, delay));
};

export const puppeteerWait = () => wait(config.PUPPETEER_WAIT_MS);
6 changes: 0 additions & 6 deletions webdriver-ts/src/forkedBenchmarkRunnerPuppeteer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
ErrorAndWarning,
FrameworkData,
Config,
puppeteerWait,
wait,
} from "./common.js";
import { startBrowser } from "./puppeteerAccess.js";
Expand Down Expand Up @@ -93,11 +92,9 @@ async function runCPUBenchmark(
// downloadThroughput: 780 * 1024 / 8, // 780 kb/s
// uploadThroughput: 330 * 1024 / 8, // 330 kb/s
// });
await puppeteerWait();

console.log("initBenchmark");
await initBenchmark(page, benchmark, framework);
await puppeteerWait();

// let categories = ["blink.user_timing", "devtools.timeline", "disabled-by-default-devtools.timeline"];
// "blink", "cc","toplevel","v8","benchmark","gpu","viz"
Expand Down Expand Up @@ -136,17 +133,14 @@ async function runCPUBenchmark(
categories: categories,
});
await wait(50);
await puppeteerWait();

await forceGC(page);
await puppeteerWait();

console.log("runBenchmark");
// let m1 = await page.metrics();

await runBenchmark(page, benchmark, framework);

await puppeteerWait();
await wait(100);
await page.tracing.stop();
// let m2 = await page.metrics();
Expand Down

0 comments on commit 3faf4a3

Please sign in to comment.