-
Notifications
You must be signed in to change notification settings - Fork 0
/
bench.sh
executable file
·42 lines (38 loc) · 1.29 KB
/
bench.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
#! /bin/sh
# Init
echo "BenchName;C++;Mono;plain-C;Vala" > bench-time.csv
echo "BenchName;C++;Mono;plain-C;Vala" > bench-size.csv
echo "BenchName;C++;Mono;plain-C;Vala" > bench-mem.csv
# Loop
for dir in $*
do
echo $dir';'$(cat `find ./$dir/ |sort -d |grep time.csv` |tr '\n' ';' |sed 's/;$//') >> bench-time.csv
echo $dir';'$(cat `find ./$dir/ |sort -d |grep size.csv` |tr '\n' ';' |sed 's/;$//') >> bench-size.csv
echo $dir';'$(cat `find ./$dir/ |sort -d |grep mem.csv` |tr '\n' ';' |sed 's/;$//') >> bench-mem.csv
done;
# (warning: just a note)
# to convert to html , Google Wiki syntax and Tab separated values
# sed 's|;|</td><td>|g;s|^\(.*\)$|<tr><td>\1</td></tr>|' data.csv
# sed 's/;/||/g;s/^\(.*\)$/||\1||/' data.csv
# sed 's/;/\t/g;s/^\(.*\)$/\t\1\t/' data.csv
# Generating charts
#
cp ploticus-time.tmpl template
sed 's/;/\t/g;s/^\(.*\)$/\1\t/' bench-time.csv >> template
pl -svg -o bench-time.svg template
pl -png -o bench-time.png template
rm template
#
cp ploticus-size.tmpl template
sed 's/;/\t/g;s/^\(.*\)$/\1\t/' bench-size.csv >> template
pl -svg -o bench-size.svg template
pl -png -o bench-size.png template
rm template
#
#
cp ploticus-mem.tmpl template
sed 's/;/\t/g;s/^\(.*\)$/\1\t/' bench-mem.csv >> template
pl -svg -o bench-mem.svg template
pl -png -o bench-mem.png template
rm template
#