Profiling
Build with gperftools, and ensure that it’s built:
$ grep profile Make.inc
GPERFTOOLS_LIBS = -lprofiler
Run your test using the profiling tools. One signal will start the profiling, another will stop it.
env CPUPROFILE=/tmp/freeradius.prof CPUPROFILESIGNAL=12 freeradius ...
killall -12 freeradius
... wait ...
killall -12 freeradius
View the results
pprof --text /path/to/freeradius /tmp/freeradius.prof
or as a graph
pprof --gv /path/to/freeradius /tmp/freeradius.prof
or as cachgrind output
pprof --cachegrind /path/to/freeradius /tmp/freeradius.prof