-
Notifications
You must be signed in to change notification settings - Fork 2
/
capture_all.sh
executable file
·73 lines (62 loc) · 1.25 KB
/
capture_all.sh
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
set -x
set -e
function usage() {
echo
echo "Usage:"
echo " $0 times [train, ref] [raw, blankit]"
echo " $0 traces [train, ref]"
echo " $0 [audit, auditmem]"
echo
exit 1
}
v4_benchmarks=(
bzip
gcc
mcf
milc
namd
gobmk
soplex
povray
hmmer
sjeng
libquantum
h264ref
lbm
omnetpp
astar
sphinx
xalancbmk
)
function capture_all_times() {
for benchmark in ${v4_benchmarks[@]}; do
results_file=${benchmark}_results
./drive_blankit.sh run $benchmark $1 $2 &> $results_file \
&& ./get_times.sh $results_file
done
}
function capture_all_audit() {
for benchmark in ${v4_benchmarks[@]}; do
results_file=${benchmark}_results
./drive_blankit.sh run $benchmark ref $1 &> $results_file
done
}
function capture_all_traces() {
for benchmark in ${v4_benchmarks[@]}; do
./drive_blankit.sh trace $benchmark
done
}
if [ $# == 1 ]; then
if [ $1 == "audit" ] || [ $1 == "auditmem" ]; then
capture_all_audit $1
else
usage
fi
elif [ $# == 2 ] && [ $1 == "traces" ]; then
capture_all_traces $2
elif [ $# == 3 ] && [ $1 == "times" ]; then
capture_all_times $2 $3
else
usage
fi