-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbenchmark.zsh
47 lines (30 loc) · 1.26 KB
/
benchmark.zsh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
if [ -z "$1" ]; then
echo "1st arugment needs to be benchmark identifier, eg. \"flickr\""
exit 1
fi
bench_file=$2
# If there is a second paramter, use this for bench file. Else, use ffs/bench.tmp as default
if [ -z "$2" ]; then
echo "2nd arugment needs to be the benchmark file"
exit 1
fi
base="./saved.nosync"
#base="/Volumes/TimeCapsule/FFS/logs"
for i in {1..20}; do
echo "Starting run $i"
log="$base/run-$i.log"
# tshark -i en9 -w "$dir/$1-trace.pcapng" -f "predef:TCP HTTP or HTTPS" &
# tshark_pid=$!
# time iozone -R -s1024 -s2048 -s4096 -s8192 -s16384 -s32768 -s65536 -s131072 -c -e -I -i0 -i1 -i2 -f $2 > $log || notify_err Benchmark failed
# time iozone -R -s1024 -s2048 -s4096 -s8192 -s16384 -s32768 -s65536 -s131072 -s262144 -c -e -I -i0 -i1 -i2 -f "$2" > "$log" || notify_err Benchmark failed
time iozone -R -s262144 -c -e -I -i0 -i1 -i2 -f "$2" > "$log" || notify_err Benchmark failed
# time iozone -R -s1024 -s2048 -s4096 -s8192 -s16384 -s32768 -s65536 -s131072 -s262144 -c -i0 -i1 -i2 -f "$2" > "$log" || notify_err Benchmark failed
return_code=$?
if [ $return_code -ne 0 ]; then
echo "Bad run $i"
fi
date
echo "Finished run $i"
# kill $tshark_pid
done
notify Benchmark is done