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
|
# run GISASFW functional tests with 'gperftools'
# see README for more explanation
mkdir -p ./output
application=../../App/App
arguments="mesocrystal profile"
focuson=GISASExperiment
# ------------------------------------------- #
# profiling cpu usage
# ------------------------------------------- #
profile_cpu=yes
if [ $profile_cpu = "yes" ]
then
OutputCpuLog=./output/gperftools_cpuprof.out
# generating log
CPUPROFILE=$OutputCpuLog $application $arguments
# analysing log
pprof --text --focus $focuson /bin/ls $OutputCpuLog
#generating graph
pprof --gv --focus GISASExperiment /bin/ls $OutputCpuLog &
# generating log for usage with qcachegrind
pprof --callgrind /bin/ls $OutputCpuLog > $OutputCpuLog.callgrind
#one have to look at it with
#~/Applications/qcachegrind.app/Contents/MacOS/qcachegrind output/gperftools_cpuprof.out.callgrind
fi
# ------------------------------------------- #
# profiling HEAP usage
# ------------------------------------------- #
profile_heap=no
if [ $profile_heap = "yes" ]
then
OutputHeapLog=./output/gperftools_heapprof
# generating log
HEAPPROFILE=$OutputHeapLog $application $arguments
# analysing log
pprof --text --focus $focuson $application ./output/gperftools_heapprof.0001.heap
#generating graph
#pprof --gv --focus $focuson $application ./output/gperftools_heapprof.0001.heap
fi
|