Skip to content

Comments

Add --taskset to bench_runtime_local#2416

Closed
fmayer wants to merge 1 commit intorust-lang:masterfrom
fmayer:master
Closed

Add --taskset to bench_runtime_local#2416
fmayer wants to merge 1 commit intorust-lang:masterfrom
fmayer:master

Conversation

@fmayer
Copy link

@fmayer fmayer commented Feb 17, 2026

This allows to run a benchmark on a subset of CPUs

This allows to run a benchmark on a subset of CPUs
@Kobzol
Copy link
Member

Kobzol commented Feb 18, 2026

Hi, can't you just apply taskset to the whole collector invocation? 🤔

@fmayer
Copy link
Author

fmayer commented Feb 18, 2026

Hi, can't you just apply taskset to the whole collector invocation? 🤔

That will make the build quite a lot slower..

@Kobzol
Copy link
Member

Kobzol commented Feb 18, 2026

You can build it once without taskset using --no-isolate, and then run it for the second time with taskset, which will not rebuild the things again.

In general, adding one-off things like this, especially if we don't make use of them, is a bit of a maintenance no-no from me. That being said, I'd be fine with a more general mechanism, e.g. something like --cmd-prefix "taskset -c 1", which would allow users to pass any command that would then be prepended before the executed benchmark. We'd have to either naively split it by spaces or shlex parse it, but that shouldn't be such an issue. Maybe even clap can pre-parse it for us.

@fmayer
Copy link
Author

fmayer commented Feb 18, 2026

Sure, sorry for the noise then.

@fmayer fmayer closed this Feb 18, 2026
@Kobzol
Copy link
Member

Kobzol commented Feb 18, 2026

I'll add the generic command prefix to my TODO list and let you know if it lands.

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