Skip to content

Commit ad390b4

Browse files
committed
feat: disable work threads when using Playwright
1 parent 0d29bfa commit ad390b4

File tree

1 file changed

+4
-1
lines changed
  • packages/artillery/lib/platform/local

1 file changed

+4
-1
lines changed

packages/artillery/lib/platform/local/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ class PlatformLocal {
3030
await this.init();
3131

3232
if (this.platformOpts.mode === 'distribute') {
33-
const count = Math.max(1, os.cpus().length - 1);
33+
// Disable worker threads for Playwright-based load tests
34+
const count = this.script.config.engines?.playwright
35+
? 1
36+
: Math.max(1, os.cpus().length - 1);
3437
this.workerScripts = divideWork(this.script, count);
3538
this.count = this.workerScripts.length;
3639
} else {

0 commit comments

Comments
 (0)