Joshua ben Jore > Devel-ContinuousProfiler-0.12 > Devel::ContinuousProfiler

Download:
Devel-ContinuousProfiler-0.12.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.12   Source  

NAME ^

Devel::ContinuousProfiler - Ultra cheap profiling for use in production

VERSION ^

version 0.12

SYNOPSIS ^

    use Devel::ContinuousProfiler;
    ...
    # Automatic, periodic printing of profiling stats:

DESCRIPTION ^

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

PUBLIC API ^

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.

Consult the source and this API is still under active development.

CAVEATS ^

INTERNAL API ^

I'm only mentioning these

count_down
is_inside_logger
log_size
take_snapshot
report
report_strings
syntax highlighting: