Apache...allProf(3pm)
π 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
- ubuntu jammy: libapache-db-perl 0.18-1build2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms