Devel::...::Apache(3)

πŸ“¦
version 0.04 Β· 2 versions
, in fedora 43

πŸ’– Devel::Profiler::Apache πŸ’–

okay bestie, welcome to the User Contributed Perl Documentation page for Devel::Profiler::Apache ✨ no cap, this is the little glue module that hooks Devel::Profiler into mod_perl πŸŽ€


🌸 NAME 🌸

Devel::Profiler::Apache β€” the way that it Hooks Devel::Profiler into mod_perl πŸ¦‹ periodt


✨ SYNOPSIS ✨

drop this in your httpd.conf:

# in httpd.conf
PerlModule Devel::Profiler::Apache;

or like, if you're a startup.pl girlie:

# or in startup.pl
use Devel::Profiler::Apache;

both slay, pick your fighter πŸ’…


πŸ’œ DESCRIPTION πŸ’œ

So here's the tea β˜• β€” the Devel::Profiler::Apache module runs a Devel::Profiler profiler inside each child server, and when that child shuts down it writes the tmon.out file into the directory $ServerRoot/logs/profiler/$$ 🫢 (yes, $$ is the PID, it's giving very much per-child energy ✨).

And then?? The next time the parent server pulls in Devel::Profiler::Apache β€” via a soft or hard restart, both work β€” the $ServerRoot/logs/dprof directory gets cleaned out before any new profiles are written for the new children 🧹πŸ”₯ so it's not just stacking up old files forever, iconic behaviour honestly.

Now, a lil heads up: Devel::Profiler::Apache currently uses the package_filter option to avoid profiling any modules that begin with Apache:: πŸ™ˆ This is necessary β€” like, mandatory necessary β€” to avoid profiling sensitive Apache XS code that does strange things with their symbol tables (storing arrays in the CODE slots, for one! πŸ’€). At some point this will be refined to only exclude the problem modules within Apache::, but that's a future era, not this one 🌈


πŸŽ€ USAGE πŸŽ€

Most users of Devel::Profiler can simply copy the code from the SYNOPSIS and use that as-is 🫢 it just works, no notes.

But if you need to modify the way Devel::Profiler works, you can pass Devel::Profiler::Apache the same options that are used with Devel::Profiler β€” like this:

use Devel::Profiler::Apache buffer_size => 1024;

same options, same energy, just through the Apache door πŸ’…


🫢 ACKNOWLEDGMENTS 🫢

This module is based heavily on Apache::DProf by Doug MacEachern πŸ‘‘ which provides equivalent functionality for Apache::DProf. Respect where respect is due, we love an OG ✨


⭐ AUTHOR ⭐

Sam Tregar πŸ’–


🌈 SEE ALSO 🌈

  • Devel::Profiler
  • Apache::DProf

go read them, iykyk πŸ“šβœ¨


and that's the whole page bestie, we ate and left no crumbs πŸ’… this lil writeup lives in perl v5.42.0, dated 2025-07-25, and it's page Devel::...::Apache(3) of the docs πŸŽ€ mwah, go profile something πŸ¦‹πŸ’–

πŸ“¦ where this page comes from