From ff0594b095442fb49be9956f318f2daee3cc12f7 Mon Sep 17 00:00:00 2001 From: Camillo Bruni Date: Tue, 1 Jul 2025 17:55:38 +0200 Subject: [PATCH 1/3] cleanup --- JetStreamDriver.js | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/JetStreamDriver.js b/JetStreamDriver.js index 6c0880d2..b5ad8ca5 100644 --- a/JetStreamDriver.js +++ b/JetStreamDriver.js @@ -404,8 +404,8 @@ class Driver { let text = ""; let newBenchmarks = []; for (const benchmark of this.benchmarks) { - const id = JSON.stringify(benchmark.constructor.scoreDescription()); - const description = JSON.parse(id); + const description = Array.from(Object.keys(benchmark.subScores())) + description.push("Score") newBenchmarks.push(benchmark); const scoreIds = benchmark.scoreIdentifiers() @@ -1012,7 +1012,6 @@ class Benchmark { return this._resourcesPromise; } - static scoreDescription() { throw new Error("Must be implemented by subclasses."); } scoreIdentifiers() { throw new Error("Must be implemented by subclasses"); } updateUIBeforeRun() { @@ -1095,10 +1094,6 @@ class DefaultBenchmark extends Benchmark { }; } - static scoreDescription() { - return ["First", "Worst", "Average", "Score"]; - } - scoreIdentifiers() { return [firstID(this), worst4ID(this), avgID(this), scoreID(this)]; } @@ -1313,10 +1308,6 @@ class WSLBenchmark extends Benchmark { }; } - static scoreDescription() { - return ["Stdlib", "MainRun", "Score"]; - } - scoreIdentifiers() { return ["wsl-stdlib-score", "wsl-tests-score", "wsl-score-score"]; } @@ -1489,10 +1480,6 @@ class WasmLegacyBenchmark extends Benchmark { }; } - static scoreDescription() { - return ["Startup", "Runtime", "Score"]; - } - get startupID() { return `wasm-startup-id${this.name}`; } From 21d700f7ad300a4df3cd5fcbc627d5a2bdccf109 Mon Sep 17 00:00:00 2001 From: Camillo Bruni Date: Mon, 14 Jul 2025 14:17:40 +0200 Subject: [PATCH 2/3] use Object.keys directly --- JetStreamDriver.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/JetStreamDriver.js b/JetStreamDriver.js index f295072a..c8b1b59d 100644 --- a/JetStreamDriver.js +++ b/JetStreamDriver.js @@ -394,7 +394,7 @@ class Driver { let text = ""; let newBenchmarks = []; for (const benchmark of this.benchmarks) { - const description = Array.from(Object.keys(benchmark.subScores())) + const description = Object.keys(benchmark.subScores()) description.push("Score") newBenchmarks.push(benchmark); From 2a6024b252541ee4bbefcdb2974f7c1cc5178ed5 Mon Sep 17 00:00:00 2001 From: Camillo Bruni Date: Mon, 14 Jul 2025 14:20:40 +0200 Subject: [PATCH 3/3] address comments --- JetStreamDriver.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/JetStreamDriver.js b/JetStreamDriver.js index c8b1b59d..5aa981ae 100644 --- a/JetStreamDriver.js +++ b/JetStreamDriver.js @@ -394,11 +394,11 @@ class Driver { let text = ""; let newBenchmarks = []; for (const benchmark of this.benchmarks) { - const description = Object.keys(benchmark.subScores()) - description.push("Score") + const description = Object.keys(benchmark.subScores()); + description.push("Score"); newBenchmarks.push(benchmark); - const scoreIds = benchmark.scoreIdentifiers() + const scoreIds = benchmark.scoreIdentifiers(); const overallScoreId = scoreIds.pop(); if (isInBrowser) {