Skip to content

Conversation

@k0kubun
Copy link
Member

@k0kubun k0kubun commented Feb 12, 2026

This PR adds --no-sudo option that skips all operations that require sudo.

When running benchmarks for testing behaviors or collecting stats, it's just annoying that it prompts me to input sudo password after some period of time. So I want to use this --no-sudo in that case. --turbo #307 currently serves a similar purpose, but it doesn't disable the min_perf_pct feature which also requires sudo and it annoys me. I'm not deleting --turbo in this PR; I want to remove --turbo later to leave some time for people to migrate to it.

While #354 is in progress to land --no-benchmark-mode, I want to have this feature before finishing the whole refactoring, and I want the name to be shorter because I often need to type it locally.

When running benchmarks on machines without sudo access, the CPU
configuration (turbo boost, min_perf_pct, frequency governor) cannot be
set or verified. The --no-sudo flag skips the entire CPUConfig setup,
which includes both the sudo-dependent writes and the checks that exit
when the expected configuration isn't detected.
@k0kubun k0kubun requested a review from a team February 12, 2026 00:57
Copy link
Contributor

@rwstauner rwstauner left a comment

Choose a reason for hiding this comment

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

👍

@k0kubun k0kubun enabled auto-merge (squash) February 12, 2026 01:05
@k0kubun k0kubun merged commit e43813c into ruby:main Feb 12, 2026
11 checks passed
@k0kubun k0kubun deleted the no-sudo-option branch February 12, 2026 01:14
@eregon
Copy link
Member

eregon commented Feb 12, 2026

Nice!

Personally I use this when I just run a benchmark to check if it runs fine or getting stats or so, and I don't want to make my machine stay in "benchmark mode / don't save power mode" after. (one could run the benchmark directly without run_benchmarks.rb but that has some nice stuff too).

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.

3 participants