just finished porting to 8.x http://drupal.org/sandbox/podarok/1924526
here is a patch against latest 8.x-1.x

Comments

podarok’s picture

StatusFileSize
new3.62 KB

fixed comments

andypost’s picture

Status: Needs review » Needs work
+++ b/lib/Drupal/xhprof/EventSubscriber/XHProfSubscriber.phpundefined
@@ -0,0 +1,34 @@
+// use Symfony\Component\HttpKernel\KernelEvents;
+// use Symfony\Component\HttpKernel\Event\GetResponseEvent;

+++ b/lib/Drupal/xhprof/XHProfBundle.phpundefined
@@ -0,0 +1,22 @@
\ No newline at end of file

Should be cleaned-up

+++ b/lib/Drupal/xhprof/EventSubscriber/XHProfSubscriber.phpundefined
@@ -0,0 +1,34 @@
+  public function onKernelRequestTest() {
+    drupal_set_message(t('My event subscriber fired!'));
...
+  static function getSubscribedEvents() {
+    $events[KernelEvents::REQUEST][] = array('onKernelRequestTest', 100);

is not needed

+++ b/lib/Drupal/xhprof/XHProfSubscriber.phpundefined
@@ -0,0 +1,42 @@
+    if (xhprof_xhprof_enable()) {
...
+  static function getSubscribedEvents() {
+    $events[KernelEvents::REQUEST][] = array('XHProfLoad', 999);

Suppose better make the check xhprof_xhprof_enable() in getSubscribedEvents()

+++ b/lib/Drupal/xhprof/XHProfSubscriber.phpundefined
@@ -0,0 +1,42 @@
+      drupal_set_message('XHProf: subscribed');

No reason for message

robloach’s picture

Status: Needs work » Needs review
StatusFileSize
new3.03 KB

Attached is an updated patch with some of the latest 8.x changes. Not quite tested fully yet.

Suppose better make the check xhprof_xhprof_enable() in getSubscribedEvents()

Not sure that's the right design choice. getSubscribedEvents() should just get the events, not do any business logic.

podarok’s picture

Status: Needs review » Reviewed & tested by the community

#3 thanks!
looks good for me

moshe weitzman’s picture

Issue summary: View changes

Anyone up for continuing this port to D8?

lussoluca’s picture

Hi, can I propose myself to continue the porting? I'm developing the webprofiler module and integrate the Drupal profiled data with the xhprof data would be very interesting

podarok’s picture

Yes, do that please.

anavarre’s picture

Shouldn't we at least get something in first so that patches could be filed against 8.x next?

lussoluca’s picture

anavarre I'll first port the module for D8 (more or less as is), then we can think how we can integrate it with webprofiler

lussoluca’s picture

Here there is a first working version for D8:

https://github.com/lussoluca/xhprof

For now there is a simple report page which shows the top 100 function. Basic integration with webprofiler is done.

If it's all ok I can attach a patch here

lussoluca’s picture

Status: Reviewed & tested by the community » Needs review
podarok’s picture

@lussoluca
Can You provide a patch against d.org repo 8.x-1.x-dev branch?
It will be much easier to review

lussoluca’s picture

StatusFileSize
new159.62 KB

Here is the patch, it's aligned with the current D8 HEAD

andypost’s picture

pushed few PR to github to fix some issues

moshe weitzman’s picture

Sine this module is so lightly maintained, Iadded andypost and lussoluca to the Maintainers list. You guys can commit here, manage issues, etc. Thanks for your help!

andypost’s picture

Status: Needs review » Fixed

pushed changes from github, so module now works for 8.0.x

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.