Skip to content

Commit edb3897

Browse files
committed
reduce warmup for select rows
1 parent 65f2102 commit edb3897

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

webdriver-ts/src/benchmarksPlaywright.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,12 @@ export const benchSelect = new (class extends CPUBenchmarkPlaywright {
9999
await checkElementExists(page, "#run");
100100
await clickElement(page, "#run");
101101
await checkElementContainsText(page, "tbody>tr:nth-of-type(1000)>td:nth-of-type(1)", "1000");
102-
for (let i = 0; i <= this.benchmarkInfo.warmupCount; i++) {
102+
// for (let i = 0; i <= this.benchmarkInfo.warmupCount; i++) {
103+
let i = 0;
103104
await clickElement(page, `tbody>tr:nth-of-type(${i + 5})>td:nth-of-type(2)>a`);
104105
await checkElementHasClass(page, `tbody>tr:nth-of-type(${i + 5})`, "danger");
105106
await checkCountForSelector(page, "tbody>tr.danger", 1);
106-
}
107+
// }
107108
}
108109
async run(browser: Browser, page: Page) {
109110
await clickElement(page, "tbody>tr:nth-of-type(2)>td:nth-of-type(2)>a");

webdriver-ts/src/benchmarksPuppeteer.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,12 @@ export const benchSelect = new (class extends CPUBenchmarkPuppeteer {
123123
await checkElementExists(page, "pierce/#run");
124124
await clickElement(page, "pierce/#run");
125125
await checkElementContainsText(page, "pierce/tbody>tr:nth-of-type(1000)>td:nth-of-type(1)", "1000");
126-
for (let i = 0; i <= this.benchmarkInfo.warmupCount; i++) {
126+
// for (let i = 0; i <= this.benchmarkInfo.warmupCount; i++) {
127+
let i=0;
127128
await clickElement(page, `pierce/tbody>tr:nth-of-type(${i + 5})>td:nth-of-type(2)>a`);
128129
await checkElementHasClass(page, `pierce/tbody>tr:nth-of-type(${i + 5})`, "danger");
129130
await checkCountForSelector(page, "pierce/tbody>tr.danger", 1);
130-
}
131+
// }
131132
}
132133
async run(page: Page) {
133134
await clickElement(page, "pierce/tbody>tr:nth-of-type(2)>td:nth-of-type(2)>a");

0 commit comments

Comments
 (0)