Performance information from newrelic.

Performance information from newrelic.

by Sebastian Mantilla -
Number of replies: 2

Hi, 

I believe that the performance information from moodle that is shown in this thread https://moodle.org/mod/forum/discuss.php?d=398444 were done with newrelic and I was wondering if anyone has experience on how to get them and could share it.

Here is a sample of what I would love to have.


This is what I have right now:


this view is missing the php code part.

Thanks for your help,
Average of ratings: -
In reply to Sebastian Mantilla

Re: Performance information from newrelic.

by Thorsten Bartel -
Picture of Core developers
Hey Sebastian,

I can't help you with the specific tool you're asking for, but I've done some basic PHP profiling on Moodle in the past.
To do this, you can use a built in feature in Moodle that is conveniently hidden unless the correct extensions are installed on your server.

Documentation can be found here: https://docs.moodle.org/dev/Profiling_PHP

In short, required packages are: "php-tideways" & "graphviz"
Afterwards, you'll find a new option "Profiling" under "Site administration" -> "Development", which will allow you to enable and configure the profiling feature.
On production, I'd suggest leaving automatic profiling disabled and going with on-demand profiling with POST-/GET-parameters:
You can then profile a page by simply adding "?PROFILEME"... or "&PROFILEME", in case it already has parameters attached.

This gives you an overview for a single call along these lines:
Overall Summary of a Moodle profiling run with php-tideways / graphviz.

You can then click "View Full Callgraph" to get a graphical overview with some color coding on how much time was spent in which parts of the script:
Full callgraph of a moodle profiling run with php-tideways / graphviz.
Average of ratings: Useful (2)
In reply to Thorsten Bartel

Re: Performance information from newrelic.

by Sebastian Mantilla -
Hey Thorsten,

This looks like really powerful and interesting.

I´m going to look into it.

Thank you very much for your help.