Hello,

I tried to profile a custom piece of code, as most of my action happens before node_save, not on note view.

I wrapped the code between

xhprof_xhprof_enable();

.... my code...

xhprof_shutdown_xhprof();

And I can see the report appear in the runs, but it is empty.

Any tips please?

Comments

giorgio79’s picture

Status: Active » Closed (works as designed)

Eh, xhprof was disables, and xhprof_xhprof_enable checks this variable...

smaz’s picture

I know this is an old thread, but incase it helps anyone else:

  variable_set('xhprof_enabled', TRUE);
  xhprof_xhprof_enable();
  // Custom code
  xhprof_shutdown_xhprof();
  variable_set('xhprof_enabled', FALSE);