#!/bin/sh
echo OS: $(uname -a 2>/dev/null || cat /proc/version)
+echo "Model: $(cat /proc/cpuinfo | awk -F: '/[mM]odel/ {print $2; exit}')"
cat /proc/cpuinfo | awk '/Features/ { sub(/\t/, ""); print; exit }'
echo Nb cores: $(grep -c processor /proc/cpuinfo)
cat /proc/meminfo | awk '/MemTotal/ { printf "Memory: %dGB\n", ($2+2^20-1)/2^20 }'
+
+config="/boot/config-$(uname -r)"
+[ -f "$config" ] && hz=$(cat "$config" | grep '^[^#].*HZ=')
+config=/proc/config.gz
+[ -f "$config" ] && hz=$(zcat "$config" | grep '^[^#].*HZ=')
+echo "Jiffies config: $(echo $hz)"
+
-#!/bin/awk -f
+#!/usr/bin/awk -f
BEGIN {
OFS=" & "
- print "Test", "Load", "Minimum", "Average", "Maximun", "Standard Dev.", "25th %", "Median", "75th %"
+ #print "Test", "Load", "Minimum (us)", "Average (us)", "Maximun (us)", "Standard Dev. (us)", "25th % (us)", "Median (us)", "75th % (us)"
}
/Test:/ {
test=$0
}
+{ sub (/us$/, "") }
+
/Minimum/ { min=$3 }
/Maximum/ { max=$3 }
/Average/ { avg=$3 }
--- /dev/null
+#!/bin/sh
+
+echo "Test & Load & Minimum (us) & Average (us) & Maximun (us) & Standard Dev. (us) & 25th % (us) & Median (us) & 75th % (us)"
+
+for t in *.exe; do
+ t=${t/.exe/};
+ for p in 0 50 100; do
+ f=$t-$p%.log
+ [ -f $f ] && awk -f gettable.awk -v COMMENT=$p% $f
+ done
+done
--- /dev/null
+#!/bin/sh
+
+# ssh-keygen
+# cat ~/.ssh/id_rsa.pub | ssh mazet@192.168.1.1 "cat >> ~/.ssh/authorized_keys"
+for f in cyclictest getinfo.sh gettable.awk hackbench load.exe mq.exe mutex.exe pipe.exe semaphore.exe test.sh thread.exe udp.exe; do
+scp mazet@192.168.1.1:benchmarks/$f .
+done
export pid
function run() {
+ load=$1
for test in mutex semaphore thread mq pipe udp; do
- ./getinfo.sh
+ ./getinfo.sh | tee $test-$load.log
pid=-1
- { ./$test.exe -d 1 -n 10000 -s -o $test-$1.dat; \
+ { ./$test.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 "$1" in
+ 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));;
}
for p in 0 50 100; do
- run $p% | tee test-$p%.log
+ run $p%
done