]> git.llucax.com Git - software/dgc/dgcbench.git/commit
Add a helper script to improve accuracy when benchmarking
authorLeandro Lucarella <llucax@gmail.com>
Sun, 14 Nov 2010 21:52:44 +0000 (18:52 -0300)
committerLeandro Lucarella <llucax@gmail.com>
Sun, 14 Nov 2010 21:52:44 +0000 (18:52 -0300)
commit3c6430d7b2a15133e467a3a4e04a3a8a012d09f3
treebf1044367709a5d9dec1e52fc6008b06ac8a2e33
parent0595f4c49dac6497be162270839c6271dee3068d
Add a helper script to improve accuracy when benchmarking

This script put the CPU in 'performance' mode to avoid distortion in the
results because of CPU frequency changes. It also gives the process
maximum CPU time and I/O priority using nice and ionice respectively.
Finally, it only uses the number of CPUs specifiend in the CPUS
environment variable to run the program.

The scripts is used like this:

CPUS=2 ./bench.sh some_prog --some-args

This runs "some_prog" passing "--some-args" as arguments, using 2 CPUs.
bench.sh [new file with mode: 0755]