]> git.llucax.com Git - software/dgc/dgcbench.git/blob - bench.sh
Add scripts to generate memory usage pattern charts
[software/dgc/dgcbench.git] / bench.sh
1 #!/bin/sh
2 set -e
3
4 export CPUS="$1"
5 shift
6
7 cpu_list=`seq 0 $(($CPUS-1))`
8
9 bye() {
10         for n in $cpu_list
11         do
12                 cpufreq-set -c $n -g ondemand
13         done
14 }
15
16 trap bye EXIT
17 trap bye INT
18
19 for n in $cpu_list
20 do
21         cpufreq-set -c $n -g performance
22 done
23
24 nice -n-19 ionice -c 1 taskset -c `echo $cpu_list | tr ' ' ,` "$@"
25