Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
"Until a backport exists, you should use Devel's XHProf integration instead."
Creating an issue for this, as I'd be interested in having it. (And might look at doing it.)
Comment | File | Size | Author |
---|---|---|---|
#5 | xhprof-backport-d6-1396922-5.patch | 15.4 KB | juampynr |
#3 | xhprof-backport-d6-1396922-3.patch | 12.1 KB | juampynr |
#1 | XHProf-6.x-1.x.zip | 34.74 KB | juampynr |
Comments
Comment #1
juampynr CreditAttribution: juampynr commentedHere is a backport for Drupal 6.
Comment #2
msonnabaum CreditAttribution: msonnabaum commentedGreat, I've been hoping someone would do this as it shouldnt be hard.
Could you maybe repost it as a patch against 7.x-1.x?
Comment #3
juampynr CreditAttribution: juampynr commentedHere you are.
Comment #4
msonnabaum CreditAttribution: msonnabaum commentedLooks like a great start, but not quite there yet.
First error I see is a notice about the type "container", which I'm assuming is a d7 thing:
Also, it appears that the function level pages are very broken still.
Comment #5
juampynr CreditAttribution: juampynr commentedFixed, so as the links to the function level pages. Some explanations in the next comment once the new patch is uploaded.
Comment #6
juampynr CreditAttribution: juampynr commentedThe path was not being loaded from the run file. That is why at admin/reports/xhprof there are no paths listed.
I simply removed the container and made the interval field a visible field.
Doing array_pop just once was leaving 'symbol' in the path, so links on function names were broken because of this.
arg() is not available on hook_boot() at Drupal 6, so I am evaluating manually the querystring.
There is no drupal_register_shutdown_function(). I have read that it is used mainly to catch possible exceptions. Should we catch them manually?
Comment #7
juampynr CreditAttribution: juampynr commentedOops, status is needs review.
Comment #8
msonnabaum CreditAttribution: msonnabaum commentedGreat, this one is working much better.
THe path thing isn't actually a bug, it's just awkward that it's only implemented by the mongo backend at the moment. I didn't want to add it to the file backend to keep compatibility with other xhprof readers.
Doing two array_pops feels dirty. We can probably come up with something better there.
+ $path = isset($_GET['q'])?$_GET['q'] : '';
Please add spaces per coding standards on ternaries.
As far as the shutdown is concerned, I forget what D6 does. The behavior is copied from devel, so lets just do whatever devel 6.x does.
Comment #9
msonnabaum CreditAttribution: msonnabaum commentedActually, I fixed the things I mentioned and committed it as the 6.x-1.x branch.
Please reopen if I missed anything.
THanks!
Comment #10
juampynr CreditAttribution: juampynr commentedIt would be nice to have at least a development version available at the project's page.