The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

wxprofile - Graphical profile data analyzer

SYNOPSIS

 @> perl -d:WxProf myscript.pl
 @> wxprofile
 @> wxprofile PATH/TO/PROFILE/tmon.out

 # to use Devel::DProf for collecting data
 @> perl -d:DProf myscript.pl
 @> wxprofile tmon.out

 # or use Devel::Profiler for collecting data...
 @> perl "-MDevel::Profiler hz => 100000" myscript.pl
 @> wxprofile tmon.out

DESCRIPTION

For collecting profile data see Devel::WxProf.

wxprofile is a graphical profile data analyzer for perl.

It supports the following profile formats:

  • WxProf

    It's own (now deprecated) - Devel::WxProf outputs data compatible to Devel::DProf

  • Devel::DProf

    Only Devel::DProf's new format is supported. This means that you cannot use Devel::DProfLB - it uses Devel::DProf's old profile data format (as of 0.01).

    You can also use Devel::Profiler for collecting profile data.

Hints on interpreting profile data

wxprofile reports inclusive times. This does not mean, the sub with the highest value is slowest - it probably just does most of the work.

wxprofile always displays wallclock ticks as profile data. The actual values are dependent on the profile format and the resolution of your system's clock.

Wallclock profilers use the so-called stopwatch approach. Whether this is useful or not is highly dependent on the application and the environment: Stopwatch results are probably correct on a single user system with low load, profiling a non-interactive application. For all other environments and applications, stopwatch results have to be used with care.

Hints on collecting profile data

POSIX::clock() resolution - which is used by most profilers, like Devel::DProf - provide 1/100s resolution on most systems. This is far from being useful for profiling single runs. Devel::WxProf collects profile data with higher resolution - at the cost of accuracy.

Devel::Profiler can be configured to use higher resolution as well, by passing a hz value as import flag:

 perl "-MDevel::Profiler hz => 10000" myscript.pl

All perl profilers have their strong and weak points. Here's a quick comparison:

  • Devel::DProf

     Method:                Debugger
     Times:                 system, user, wall
     Resolution:            system resolution, usually 1/100s
     profiles closures:     Yes
     profiles DESTROY:      Yes
     sub exit w/o return:   Yes
     outputs raw data:      Yes
     data format:           Devel::DProf (new)
  • Devel::DProfLB

     Method:                Debugger
     Times:                 system, user, wall
     Resolution:            system resolution, usually 1/100s
     profiles closures:     Yes
     profiles DESTROY:      Yes
     sub exit w/o return:   ??
     outputs raw data:      Yes
     data format:           Devel::DProf (old)
  • Devel::Profile

     Method:                ??
     Times:                 system, user, wall
     Resolution:            system resolution, usually 1/100s
     profiles closures:     Yes
     profiles DESTROY:      Yes
     sub exit w/o return:   ??
     outputs raw data:      No
     data format:           Devel::Profile
  • Devel::Profiler

     Method:                Sub instrumentor
     Times:                 system, user, wall (only wall with higher resolution)
     Resolution:            configurable
     profiles closures:     No
     profiles DESTROY:      No
     sub exit w/o return:   ??
     outputs raw data:      Yes
     data format:           Devel::DProf (new)
  • Devel::WxProf

     Method:                Debugger
     Times:                 wall
     Resolution:            1/10000s
     profiles closures:     Yes
     profiles DESTROY:      Yes
     sub exit w/o return:   No
     outputs raw data:      Yes
     data format:           Devel::DProf

BUGS AND LIMITATIONS

Many.

See Devel::WxProf for more information

  • Memory usage

    wxprofile eats up around 20x more memory than your profile data.

    You have been warned.

  • Treemap proportions

    The treemap proportions do not reflect times exactly. The treemap rectangles include an additional top padding to keep the labels readable.

  • Windows

    Due to some incompatibilities in font handling, wxprofile is currently broken on windows.

    While it can be made to run with some minor changes, it looks a bit strange. Don't know where THAT comes from.

    Feel free to help ;-)

LICENSE AND COPYRIGHT

Copyright 2008 Martin Kutter.

This program is free software. You may distribute/modify it under the same terms as perl itself

AUTHOR

Martin Kutter <martin.kutter fen-net.de>

REPOSITORY INFORMATION

 $Rev: 583 $
 $LastChangedBy: kutterma $
 $Id: $
 $HeadURL: $

1 POD Error

The following errors were encountered while parsing the POD:

Around line 718:

You forgot a '=back' before '=head1'

You forgot a '=back' before '=head1'