NAME

Krang::Profiler - Devel::Profiler wrapper for Krang


SYNOPSIS

  KRANG_PROFILE=1 ./script_to_profile.pl


DESCRIPTION

This module provides a wrapper around Devel::Profiler setup to work correctly with Krang. To use this module set the environment variable KRANG_PROFILE to 1 and run the script you wish to profile. Don't forget to use Krang::Script since that's how this module gets activated.

NOTE: Do not use Krang::Profiler directly unless you want profiling to be turned on all the time.

This module sets up Devel::Profiler to only profile subroutines in the Krang hierarchy. That means that calls that Krang makes to external modules are rolled into the Krang subroutine that calls them. For example, if your method Krang::Foo::bar() makes ten calls to DBI that take 1 second each and does no other processing then Krang::Foo::bar() will appear in the profile as taking 10 seconds. The DBI methods will not appear.


INTERFACE

None.