forked from cdsc-github/parade-ara-simulator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
get.stats.sh
executable file
·71 lines (69 loc) · 1.98 KB
/
get.stats.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
################################################################################################################
#Common configurations in the script
PREFIX=$1
VERSION=$2
BASE_DIR=./parade-${PREFIX}-${VERSION}/
if [[ ${VERSION} == begin || ${VERSION} == comp-begin ]]; then
Cycle="system.cpu.numCycles"
else
Cycle="system.switch_cpus_1.numCycles"
fi
Instrs="sim_insts"
Ops="sim_ops"
SimTime="sim_seconds"
HostTime="real"
BENCHS=(
###Medical Imaging(MI) benchmarks##############
'Deblur_Modified'
'Denoise'
'Registration_Modified'
'Segmentation'
###CoMmercial(CM) benchmarks###################
'BlackScholes'
'StreamCluster'
'Swaptions'
###computer VISion(VIS) benchmarks#############
'LPCIP_Desc'
'Texture_Synthesis'
###NAVigation(NAV) benchmarks##################
'Robot_Localization'
'Disparity_Map'
'EKF_SLAM'
)
for bench in ${BENCHS[@]}; do
printf "${bench}\t"
BENCH_DIR=${BASE_DIR}/${PREFIX}_${bench}/
_FILENAME=${BENCH_DIR}/stats.txt
if grep "${Cycle}" ${_FILENAME} > tmp
then
grep "${Cycle}" ${_FILENAME} | awk '{printf "\t%s", $2}{if($2=="")printf "\t\terror"}'
else
echo -n -e "\terror"
fi
if grep "${Instrs}" ${_FILENAME} > tmp
then
grep "${Instrs}" ${_FILENAME} | awk '{printf "\t%s", $2}{if($2=="")printf "\t\terror"}'
else
echo -n -e "\terror"
fi
if grep "${Ops}" ${_FILENAME} > tmp
then
grep "${Ops}" ${_FILENAME} | awk '{printf "\t%s", $2}{if($2=="")printf "\t\terror"}'
else
echo -n -e "\terror"
fi
if grep "${SimTime}" ${_FILENAME} > tmp
then
grep "${SimTime}" ${_FILENAME} | awk '{printf "\t%s", $2}{if($2=="")printf "\t\terror"}'
else
echo -n -e "\terror"
fi
_FILENAME=${BENCH_DIR}/result.txt
if grep "${HostTime}" ${_FILENAME} > tmp
then
grep "${HostTime}" ${_FILENAME} | awk '{printf "\t%s", $2}{if($2=="")printf "\t\terror"}'
else
echo -n -e "\terror"
fi
echo ""
done