criterion.rs icon indicating copy to clipboard operation
criterion.rs copied to clipboard

Checking the CPU governor

Open Dietr1ch opened this issue 4 years ago • 0 comments

I noticed that I was able to run a benchmark without getting warnings about not using the performance cpu governor, which prevents scaling down the cpu clock.

This is akin to https://github.com/google/benchmark/issues/325 in Google's C++ benchmark library.

Maybe running something around this should also be suggested,

 begin
     sudo cpupower frequency-set -g performance

     cargo bench

     sudo cpupower frequency-set -g ondemand  # Or whatever was the previous governor
 end

I also missed some warnings around the current cpu usage prior to executing the benchmarks. but I'm not sure how useful would that really be

Dietr1ch avatar Aug 31 '20 04:08 Dietr1ch