aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/run_benches.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/monniaux/run_benches.sh')
-rwxr-xr-xtest/monniaux/run_benches.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/monniaux/run_benches.sh b/test/monniaux/run_benches.sh
index 60eec865..2b2e28d6 100755
--- a/test/monniaux/run_benches.sh
+++ b/test/monniaux/run_benches.sh
@@ -1,13 +1,16 @@
source benches.sh
+cores=$(grep -c ^processor /proc/cpuinfo)
+processes=$((cores/4))
+
rm -f commands.txt
for bench in $benches; do
echo "(cd $bench && echo \"Running $bench..\" &&\
make -j4 run > /dev/null && echo \"$bench DONE\")" >> commands.txt
done
-cat commands.txt | xargs -n1 -I{} -P6 bash -c '{}'
+cat commands.txt | xargs -n1 -I{} -P$processes bash -c '{}'
##
# Gather all the CSV files