Skip to content

Commit 6d06f80

Browse files
committed
disable memory benchmarks + improve logging
1 parent 3602dda commit 6d06f80

File tree

4 files changed

+21
-17
lines changed

4 files changed

+21
-17
lines changed

webdriver-ts/src/benchmarkRunner.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
} from "./common.js";
1010
import { fork } from "node:child_process";
1111
import * as fs from "node:fs";
12+
import { performance } from "node:perf_hooks";
1213
import {
1314
BenchmarkInfo,
1415
benchmarkInfos,
@@ -201,6 +202,7 @@ async function runBench(
201202
let plausibilityCheck = new PlausibilityCheck();
202203

203204
for (let j = 0; j < benchmarkInfos.length; j++) {
205+
const startTime = performance.now();
204206
for (let i = 0; i < runFrameworks.length; i++) {
205207
try {
206208
let result;
@@ -233,6 +235,8 @@ async function runBench(
233235
errors.push(error as string);
234236
}
235237
}
238+
const duration = performance.now() - startTime;
239+
console.log(`==> Duration for benchmark ${benchmarkInfos[j].id}: ${duration.toFixed(2)} ms`);
236240
}
237241

238242
if (warnings.length > 0) {

webdriver-ts/src/benchmarksCommon.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export enum Benchmark {
8282
_21 = "21_ready-memory",
8383
_22 = "22_run-memory",
8484
_23 = "23_update5-memory",
85-
// _24 = "24_run5-memory",
85+
_24 = "24_run5-memory",
8686
_25 = "25_run-clear-memory",
8787
_26 = "26_run-10k-memory",
8888
_30 = "30_startup",
@@ -229,12 +229,12 @@ export const memBenchmarkInfosArray: Array<MemBenchmarkInfo> = [
229229
description: "Memory usage after adding 1,000 rows.",
230230
type: BenchmarkType.MEM,
231231
},
232-
{
233-
id: Benchmark._23,
234-
label: "update every 10th row for 1k rows (5 cycles)",
235-
description: "Memory usage after clicking update every 10th row 5 times",
236-
type: BenchmarkType.MEM,
237-
},
232+
// {
233+
// id: Benchmark._23,
234+
// label: "update every 10th row for 1k rows (5 cycles)",
235+
// description: "Memory usage after clicking update every 10th row 5 times",
236+
// type: BenchmarkType.MEM,
237+
// },
238238
// {
239239
// id: Benchmark._24,
240240
// label: "replace 1k rows (5 cycles)",
@@ -247,12 +247,12 @@ export const memBenchmarkInfosArray: Array<MemBenchmarkInfo> = [
247247
description: "Memory usage after creating and clearing 1000 rows 5 times",
248248
type: BenchmarkType.MEM,
249249
},
250-
{
251-
id: Benchmark._26,
252-
label: "run memory 10k",
253-
description: "Memory usage after adding 10,000 rows.",
254-
type: BenchmarkType.MEM,
255-
},
250+
// {
251+
// id: Benchmark._26,
252+
// label: "run memory 10k",
253+
// description: "Memory usage after adding 10,000 rows.",
254+
// type: BenchmarkType.MEM,
255+
// },
256256
];
257257

258258
export const startupBenchmarkInfosArray: Array<StartupMainBenchmarkInfo> = [

webdriver-ts/src/benchmarksPlaywright.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,8 @@ export const benchmarks = [
323323
benchClear,
324324
benchReadyMemory,
325325
benchRunMemory,
326-
benchRun10KMemory,
327-
benchUpdate5Memory,
326+
// benchRun10KMemory,
327+
// benchUpdate5Memory,
328328
// benchReplace5Memory,
329329
benchCreateClear5Memory,
330330
];

webdriver-ts/src/benchmarksPuppeteer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,8 +397,8 @@ export const benchmarks = [
397397
benchClear,
398398
benchReadyMemory,
399399
benchRunMemory,
400-
benchUpdate5Memory,
400+
// benchUpdate5Memory,
401401
// benchReplace5Memory,
402402
benchCreateClear5Memory,
403-
benchRun10KMemory,
403+
// benchRun10KMemory,
404404
];

0 commit comments

Comments
 (0)