I am currently using xdebug and experimenting with profiling and viewing w/ KCacheGrind. I have it set to only operate on trigger, i.e. passing XDEBUG_PROFILE=1
via GET.
There is a lot of noise in the output concerning the framework I am using and would like to be able to specifically profile a chunk of my code, like a controller, rather than the entire request.
Am I able to have xdebug profiling turned off until I choose to turn it on, like in a controller, and then turn it back off when I want?
Am I able to have xdebug profiling turned off until I choose to turn it on, like in a controller, and then turn it back off when I want?
No, you either profile the request or you won't. You can not switch it on in one function and switch it of in another within the same request.
It wouldn't make much sense for a single request somehow, because you need to metric each part of the application in relevance to the other parts.
Alternatively there is the xhprof extension.
If you need to profile data over time from within specific areas, take a look at the Pinba PHP Extension.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With