3

I want to profile a particular slow admin action that we have, but it calls _redirect at the end, is there an in-built way of seeing this profile information, or will I have to manually create an event to listen to something like controller_front_send_response_after and output the information into a log file?

Incidentally, Mage::run calls Varien_Profiler::stop('mage'); seemingly as the last thing the application does. Surely this call actually does nothing because the block is already rendered at that point, or did I miss something?

2

This post might help you: http://forrst.com/posts/Log_Varien_Profiler_output_to_file-h97. It explains how you output the Varien_Profiler contents to a log.

With that you can create your own extension, create an observer that listens to controller_front_send_response_after (or any other event) and log the Profiler results in the observer.

  • This is essentially what I've done, with the exception I'm checking for a registry entry so that I only get output for the actions I want by registering that variable in the actions I wish to debug. I'll accept this answer if nobody comes up with a built in way of doing it (which I doubt they will). – Peter O'Callaghan Nov 1 '13 at 11:50
  • I've actually looked for it before on Mage 1.7. wasn't in there yet :) – Sander Mangel Nov 1 '13 at 11:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.