update scripts
authorLaurent MAZET <laurent.mazet@thalesgroup.com>
Wed, 8 Oct 2025 09:27:26 +0000 (11:27 +0200)
committerLaurent MAZET <laurent.mazet@thalesgroup.com>
Wed, 8 Oct 2025 09:27:26 +0000 (11:27 +0200)
sync.sh
test.sh

diff --git a/sync.sh b/sync.sh
index 75300a012503a2d04e865cd0445eca720f0b1ada..f3c7702ad770758a3b63153f2abf994dba2543dc 100755 (executable)
--- 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 eca0eb2f376edb09aa9882cd33880f54ba880647..94c419b2783198c88e523bfa8dfb1973f82497b4 100755 (executable)
--- 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