Skip to content

Fix "detailed results" button for doc-json benchmarks - #2532

Open
JonathanBrouwer wants to merge 1 commit into
rust-lang:mainfrom
JonathanBrouwer:fix-detailed-results-doc-json
Open

Fix "detailed results" button for doc-json benchmarks#2532
JonathanBrouwer wants to merge 1 commit into
rust-lang:mainfrom
JonathanBrouwer:fix-detailed-results-doc-json

Conversation

@JonathanBrouwer

@JonathanBrouwer JonathanBrouwer commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Clicking "detailed results" on one of the doc-json benchmarks, for example in this run, returns an error:

invalid profile: "json is not a profile"

r? @Kobzol

// We turn <benchmark>-<profile> into two separate parameters for the backend
const parts = benchmark.split("-");
let parts: string[];
if (benchmark.endsWith("-doc-json")) {

@JonathanBrouwer JonathanBrouwer Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not happy with this code, but not experienced enough in TS to know if there's a better way

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems weird to use - on a string, but it's JavaScript, so I had to check what that does 😆 Probably a typo? The code doesn't seem to work though.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe something like this? To keep it fully general:

[...a.slice(0, -"-doc-json".length).split("-"), "doc-json"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants