Devel::ContinuousProfiler - Ultra cheap profiling for use in production
version 0.12
use Devel::ContinuousProfiler; ... # Automatic, periodic printing of profiling stats:
This module automatically takes periodic snapshots of the callstack and prints reports of the hottest code. The CPU cost of doing the profiling work is automatically scaled to about 1/1024th the total.
The report format:
=<pid>= <process name> profiling stats. =<pid>= <count> <frame>,<frame>,<frame>,... =<pid>= <count> <frame>,<frame>,<frame>,... =<pid>= <count> <frame>,<frame>,... ...
An example of some output gleaned from a very short script:
=10203= eg/sample.pl profiling stats. =10203= 11 =10203= 6 X::a,X::b =10203= 4 X::a =10203= 4 X::a,X::b,X::c =10203= 2 X::a,X::b,X::c,X::d
The PROFILER environment variable and the frame_format and output_handle functions. Ultimately, replace the take_snapshot function if you want to get different reports.
PROFILER
frame_format
output_handle
take_snapshot
Consult the source and this API is still under active development.
This module's public API is under active development and experimentation.
CPAN testers is showing segfaults. Not sure what's going on there yet.
I'm only mentioning these
To install Devel::ContinuousProfiler, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Devel::ContinuousProfiler
CPAN shell
perl -MCPAN -e shell install Devel::ContinuousProfiler
For more information on module installation, please visit the detailed CPAN module installation guide.