Debian Codegraph @

doc/antora/modules/developers/pages/profile.adoc

raw
1 = Profiling
2
3 Build with gperftools, and ensure that it's built:
4
5 [source,shell]
6 ----
7 $ grep profile Make.inc
8 GPERFTOOLS_LIBS = -lprofiler
9 ----
10
11 Run your test using the profiling tools. One signal will start the
12 profiling, another will stop it.
13
14 [source,shell]
15 ----
16 env CPUPROFILE=/tmp/freeradius.prof CPUPROFILESIGNAL=12 freeradius ...
17 killall -12 freeradius
18 ... wait ...
19 killall -12 freeradius
20 ----
21
22 View the results
23
24 [source,shell]
25 ----
26 pprof --text /path/to/freeradius /tmp/freeradius.prof
27 ----
28
29 or as a graph
30
31 [source,shell]
32 ----
33 pprof --gv /path/to/freeradius /tmp/freeradius.prof
34 ----
35
36 or as cachgrind output
37
38 [source,shell]
39 ----
40 pprof --cachegrind /path/to/freeradius /tmp/freeradius.prof
41 ----