From 1d6ce711c1b5151b4c04a390ccc1454d61c75cd6 Mon Sep 17 00:00:00 2001 From: Camillo Bruni Date: Tue, 26 Aug 2025 22:49:16 +0200 Subject: [PATCH 1/2] support custom benchmark arguments --- JetStreamDriver.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/JetStreamDriver.js b/JetStreamDriver.js index 0ef099ba..cd25ef1f 100644 --- a/JetStreamDriver.js +++ b/JetStreamDriver.js @@ -740,9 +740,16 @@ class Benchmark { return tags.some((tag) => this.tags.has(tag.toLowerCase())); } + get benchmarkArguments() { + return { + ...this.plan.arguments, + iterationCount: this.iterations, + }; + } + get runnerCode() { return `{ - const benchmark = new Benchmark(${this.iterations}); + const benchmark = new Benchmark(${JSON.stringify(this.benchmarkArguments)}); const results = []; const benchmarkName = "${this.name}"; @@ -1404,7 +1411,7 @@ class WSLBenchmark extends Benchmark { get runnerCode() { return `{ - const benchmark = new Benchmark(); + const benchmark = new Benchmark(${JSON.stringify(this.benchmarkArguments)}); const benchmarkName = "${this.name}"; const results = []; From b980e22d51db0ee09f32c07e711c0f109aeafda4 Mon Sep 17 00:00:00 2001 From: Camillo Bruni Date: Wed, 27 Aug 2025 17:07:31 +0200 Subject: [PATCH 2/2] fix RexBench --- RexBench/benchmark.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RexBench/benchmark.js b/RexBench/benchmark.js index 5e6ef2be..0e2f5fd9 100644 --- a/RexBench/benchmark.js +++ b/RexBench/benchmark.js @@ -25,7 +25,7 @@ "use strict"; class Benchmark { - constructor(verbose = 0) + constructor({verbose = 0}) { this._verbose = verbose; }