upstream version 1.2.2
[debian/freetts] / tests / benchmarks / jprof
1 #!/bin/sh
2 #
3 # Runs FreeTTS under the Java profiler. Collects profile information
4 # in log.txt. Also prints out heap summary information.
5 #
6 FREETTS=../../lib/freetts.jar
7 export FREETTS
8 java -Xrunhprof:heap=dump,file=log.txt -jar $FREETTS $@
9 egrep 'OBJ|ARR' log.txt  | sed 's/(//g' | sed 's/,//g' | sed ' s/=/ /g' | awk '
10 { size += $4; totalObjects++ }
11 $1 == "OBJ" { objs++ }
12 $1 == "ARR" { arr++ }
13
14 END { print "Tot:", totalObjects, "Size:", size, "Obj:", objs, "Arr:", arr; }
15 '