NAME

DashProfiler - collect call count and timing data aggregated by context

SYNOPSIS

A work-in-progress

DESCRIPTION

Profile = store of profile info Profiler = wrapper with key1 set Sample = object from Profiler

Via DashProfiler::Import cost per call = 50,000/second, 0.000020s on modern box (not accurate to realworld situations because of L2 caching, but the general message that "it's fast" is)

APACHE CONFIGURATION

<Perl>
BEGIN {
    use DashProfiler;
    # create profile early so other code executed during startup
    # can see the named profile
    DashProfiler->add_profile('subsys', {
        disabled => 0,
        granularity => 30,
        flush_interval => 60,
        add_exclusive_sample => 'other',
        spool_directory => '/tmp', # needs write permission for 'nobody'
    });
}
</Perl>

PerlChildInitHandler DashProfiler::reset_all_profiles
PerlPostReadRequestHandler DashProfiler::start_sample_period_all_profiles
PerlCleanupHandler DashProfiler::end_sample_period_all_profiles
PerlChildExitHandler DashProfiler::flush_all_profiles

add_profile

DashProfiler->add_profile( 'my_profile_name' );
DashProfiler->add_profile( my_profile_name => { ... } );
$stash = DashProfiler->add_stash( my_profile_name => { ... } );

Calls DashProfiler::Core->new to create a new stash and then caches it, using the name as the key, so it can be refered to by name.

See DashProfiler::Core for details of the arguments.

prepare

$sampler = DashProfiler->prepare($profile_name, ...);

Calls prepare(...) on the profile named by $profile_name.

If no profile with that name exists then it will warn, but only once per name.