Skip to content

Use subScores directly for the UI #81

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 15, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 3 additions & 16 deletions JetStreamDriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -394,11 +394,11 @@ 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 = Object.keys(benchmark.subScores());
description.push("Score");

newBenchmarks.push(benchmark);
const scoreIds = benchmark.scoreIdentifiers()
const scoreIds = benchmark.scoreIdentifiers();
const overallScoreId = scoreIds.pop();

if (isInBrowser) {
Expand Down Expand Up @@ -1005,7 +1005,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() {
Expand Down Expand Up @@ -1088,10 +1087,6 @@ class DefaultBenchmark extends Benchmark {
};
}

static scoreDescription() {
return ["First", "Worst", "Average", "Score"];
}

scoreIdentifiers() {
return [firstID(this), worst4ID(this), avgID(this), scoreID(this)];
}
Expand Down Expand Up @@ -1310,10 +1305,6 @@ class WSLBenchmark extends Benchmark {
};
}

static scoreDescription() {
return ["Stdlib", "MainRun", "Score"];
}

scoreIdentifiers() {
return ["wsl-stdlib-score", "wsl-tests-score", "wsl-score-score"];
}
Expand Down Expand Up @@ -1486,10 +1477,6 @@ class WasmLegacyBenchmark extends Benchmark {
};
}

static scoreDescription() {
return ["Startup", "Runtime", "Score"];
}

get startupID() {
return `wasm-startup-id${this.name}`;
}
Expand Down
Loading