Is it possible to activate xhprof only after a -tot- of time after a page/url is called?
Normally I have pages that respond under 1 second. Sometimes they responde in 10 seconds (no, it's not the session on file). I want to activate xhprof after 1 second from the beginning of the request. (It's ok to lose first second of profiling by now)
If it was javascript, we have the setTimeout, but PHP is not threaded.
Any Idea?
You can use something like this. xhprofon.php:
Then use auto_prepend_file for include this file on all pages.