3 parts · Read in order
Where the time goes
What a profiler can and cannot see, how to read what it produces, and where a request's time actually accumulates.
Where you start the clock decides which function looks slow
One workload, two profiling mechanisms. Instrumentation cost 13% and missed the function that was 55% of the request; sampling cost nothing measurable and found it.
The widest block in a cold flame graph is the autoloader
The same endpoint profiled twice - 65.8 ms and 8.4 ms. What changed in the picture, and how to tell one slow call from ten thousand fast ones.
The classmap removes 508 syscalls and saves nothing
Composer's optimized autoloader took a cold request from 92.079 ms to 92.625. What the cold start is actually made of, and the measurement mistake that said otherwise.