-
-
Save graysky2/0a0bd8e5e7eaa65e4fc7122a7af838fd to your computer and use it in GitHub Desktop.
bench
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
calc() { | |
diff=$(echo "scale=6; $finish - $start" | bc) | |
simpdiff=$(echo "scale=2; $finish - $start" | bc) | |
runsleft=$(echo "scale=2; $limit-$x"| bc) | |
secleft=$(echo "scale=2; $runsleft*$diff"|bc) | |
minleft=$(echo "scale=2; $runsleft*$diff/60"|bc) | |
eta=$(date -d "($date) $secleft sec" +%r) | |
echo "Run $x/$limit took $simpdiff seconds." | |
echo "$x,$TASK,$diff" >> "$HOME/results.csv" | |
} | |
export CPPFLAGS="-D_FORTIFY_SOURCE=2" | |
export CFLAGS="-march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector-strong -fno-plt" | |
export CXXFLAGS="-march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector-strong -fno-plt" | |
export LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now" | |
export MAKEFLAGS="-j15" | |
export DISTCC_HOSTS="10.9.8.128:3635" | |
limit="32" | |
x=0 | |
echo "Starting... $x/$limit" | |
while [[ "$x" -lt "$limit" ]]; do | |
x=$(( x + 1 )) | |
cd /scratch/testbuild-b5b6bb9bdb5e62bc7dfc64b40bd833bffd971693 || exit 1 | |
make ${MAKEFLAGS} clean CC=distcc | |
for TASK in zImage modules dtbs; do | |
start=$(date +%s.%N) | |
make ${MAKEFLAGS} "$TASK" CC=distcc | |
finish=$(date +%s.%N) | |
export TASK | |
calc | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment