From: Laurent MAZET Date: Wed, 8 Oct 2025 09:27:26 +0000 (+0200) Subject: update scripts X-Git-Url: https://secure.softndesign.org/git/?a=commitdiff_plain;h=9c5a88c4abc5ef58621313e5dbbce601a8b43853;p=benchmarks.git update scripts --- diff --git a/sync.sh b/sync.sh index 75300a0..f3c7702 100755 --- a/sync.sh +++ b/sync.sh @@ -10,4 +10,4 @@ date $(ssh $HOST date +%m%d%H%M%Y) for f in cyclictest hackbench '*.exe' '*.sh'; do scp $HOST:benchmarks/$f . done -rm load.exe +mv load.exe load diff --git a/test.sh b/test.sh index eca0eb2..94c419b 100755 --- a/test.sh +++ b/test.sh @@ -1,26 +1,26 @@ #!/bin/sh -export pid - function run() { - load=$1 + cpu=$1 + load=$2 for exe in *.exe; do test=${exe/.exe/} echo -e "\033[0;1mTest $test\033[0;0m" ./getinfo.sh | tee $test-$load.log - pid=-1 { ./$exe -d 1 -n 10000 -s -o $test-$load.dat | tee -a $test-$load.log; \ - kill -2 $(ps -e | awk '/[h]ackbench/ || /[s]leep/ { print $1 }') 2>/dev/null; } & - case "$load" in - 0%) sleep 60;; - 50%) ./hackbench -p -g 1 -f 1 -T 1 -P 1 -s $((100 * 1000)) -l $((2 * 1000 * 1000));; - 100%) ./hackbench -p -g 20 -l $((100 * 1000));; - esac + kill -2 $(ps -e | awk '/[l]oad/ || /[s]leep/ { print $1 }') 2>/dev/null; } & + if [ $cpu -eq 0 ]; + sleep 60 + else + ./load $cpu + fi echo "Cleaning..." sleep 1 done } -for p in 0 50 100; do - run $p% +nbcpu=$(grep -c processor /proc/cpuinfo) +for k in $(seq 0 $nbcpu); do + p=$(expr $k * 100 / $nbcpu) + run $k $p% done