Devel::ContinuousProfiler - Ultra cheap profiling for use in production
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
PROFILER environment variable and the
output_handle functions. Ultimately, replace the
take_snapshot function if you want to get different reports.
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