Apache...allProf(3pm)

πŸ“¦
version 0.18 Β· 2 versions
, in ubuntu jammy

πŸ’… Apache::SmallProf β€” the perl manual, but make it cute πŸŽ€

okay bestie, this is a page from the User Contributed Perl Documentation (yes, the 3pm section, we're fancy like that) and it's all about hooking a profiler into mod_perl. buckle up πŸ¦‹


✨ NAME ✨

Apache::SmallProf β€” hooks Devel::SmallProf into mod_perl. that's the whole vibe. πŸ’–


🌸 SYNOPSIS 🌸

so this is literally how you turn it on, no cap:

 <IfDefine PERLSMALLPROF>

    <Perl>
     use Apache::DB ();
     Apache::DB->init;
    </Perl>

    <Location />
     PerlFixupHandler Apache::SmallProf
    </Location>
 </IfDefine>

wrap it in <IfDefine PERLSMALLPROF> and it only kicks in when you define that thing, iykyk. 🫢


πŸ‘‘ DESCRIPTION πŸ‘‘

okay so real talk: Devel::SmallProf is a line-by-line code profiler. like, it goes line by line. obsessive. we love that for it. πŸ’…

Apache::SmallProf serves that same profiler up inside the mod_perl environment. and here's the glow-up: profiles get written to $ServerRoot/logs/smallprof, and β€” unlike Devel::SmallProf β€” the profile is split into several files based on package name. one file per package, organized queen behavior ✨

the Devel::SmallProf documentation is where you go to learn how to analyize the profiles, like so:

% sort -nrk 2  logs/smallprof/CGI.pm.prof | more
        1 0.104736       629:     eval "package $pack; $$auto";
        2 0.002831       647:       eval "package $pack; $code";
        5 0.002002       259:    return $self->all_parameters unless @p;
        5 0.000867       258:    my($self,@p) = self_or_default(@_);
        ...

look at those numbers go. ate. πŸ”₯


πŸ“œ LICENSE πŸ“œ

this module is distributed under the same terms as Perl itself. slay, legally speaking. πŸ’œ


πŸ¦‹ SEE ALSO πŸ¦‹

the whole friend group fr fr 🌈


πŸŽ€ AUTHOR πŸŽ€

Devel::SmallProf β€” Ted Ashton Apache::SmallProf, derived from Devel::SmallProf β€” Doug MacEachern

currently maintained by Dirk Lindner <lze@cpan.org.org> 🫢


and that's the tea, bestie β€” this page came to you from perl v5.34.0, dated 2022-02-06, straight out of the Apache...allProf(3pm) corner of the docs. go profile something iconic. πŸ’–βœ¨πŸŽ€
πŸ“¦ where this page comes from