ddev
ddev copied to clipboard
improve xhprof listing page
I am profiling something with xhprof on ddev for the first time. One thing that I immediately had the need for was to connect the profiling with a URI, as a page was hitting the server quite a few times for a single url refresh.
I tried a few different approaches and currently settled on https://gist.github.com/hanoii/a6170b580138d825f7c07a1bd5b113c6
All is a bit of PoC right now.
A few things that I am doing that maybe it's worth adding to ddev, and if so, I can see around providing a PR at some point:
- ignore /favicon.ico - this is actually something that I think it's worth doing all the time, otherwise it creates random profiles even by visting /xhprof if the favicon is not found and drupal handles the 404 You need to hard refresh to see this happenning.
- store additional information (for now I am storing just the uri, but more things can be added).
- Replace the listing with this additional information. This could replace it entirely or just prepend/append it.