Skip to content

Commit cd885d6

Browse files
committed
remove client param from forceGC
1 parent ec2c5a1 commit cd885d6

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

webdriver-ts/src/forkedBenchmarkRunnerPlaywright.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ async function runMemBenchmark(
191191

192192
console.log("runBenchmark");
193193
await runBenchmark(browser, page, benchmark, framework);
194-
await forceGC(page, client);
194+
await forceGC(page);
195195
await wait(40);
196196
// let result = (await client.send('Performance.getMetrics')).metrics.filter((m) => m.name==='JSHeapUsedSize')[0].value / 1024 / 1024;
197197

webdriver-ts/src/forkedBenchmarkRunnerPuppeteer.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ async function runCPUBenchmark(
107107
"devtools.timeline",
108108
"disabled-by-default-devtools.timeline",
109109
];
110-
const client = await page.createCDPSession();
111110

112111
// let categories = [
113112
// "-*", // exclude default
@@ -139,7 +138,7 @@ async function runCPUBenchmark(
139138
await wait(50);
140139
await puppeteerWait();
141140

142-
await forceGC(page, client);
141+
await forceGC(page);
143142
await puppeteerWait();
144143

145144
console.log("runBenchmark");
@@ -252,7 +251,7 @@ async function runMemBenchmark(
252251

253252
console.log("runBenchmark");
254253
await runBenchmark(page, benchmark, framework);
255-
await forceGC(page, client);
254+
await forceGC(page);
256255
await wait(40);
257256
let result = ((await page.evaluate("performance.measureUserAgentSpecificMemory()")) as any).bytes / 1024 / 1024;
258257
console.log("afterBenchmark");

0 commit comments

Comments
 (0)