Extension:PerformanceMonitor

The PerformanceMonitor extension profiles the work of PHP functions and methods on your server. These "profiles" (i.e. logfiles) are stored as Json-Trees in the file system. After profiling you can use the Special Page Special:PerformanceMonitor to visualise the results as diagrams. The diagrams allow drilling down to more detailed levels and show you, what the f*** the server does all the time you are waiting for it.

Technically the extension uses a javascript library called InfoVis for visualisation, which you have to download seperately and put it inside the extension folder.

Download PerformanceMonitor
The code of this extension will be available for download on MW Gerrit soon. Put it into the folder /extensions/PerformanceMonitor.

Download the InfoVis Toolkit
Download the InfoVis Toolkit from http://philogb.github.io/jit/downloads/Jit-2.0.1.zip and put it inside the /extensions/PerformanceMonitor/js-includes/jit-2.0.1 folder of the extension.

Download Bootstrap Library
Download the InfoVis Toolkit from http://getbootstrap.com/getting-started/ and put it inside the /extensions/PerformanceMonitor/js-includes/bootstrap-3.1.1-dist folder of the extension.

LocalSettings.php
use

instead of

StartProfiler.php
The file StartProfiler.php is located (if it exists) in the main folder of the wiki, i.e. the same as LocalSettings.php. If it exists, comment out the current code and add the following code. Otherwise create it and put the following inside:

Create a ServerImplementation class for your server
One thing in advance: this is a beta - and I know that it would be easier to locate this bunch of paths etc. in the local settings. I had reasons to implement it like this, however. If you feel like it, extend the LocalServer class to allow for settings taken from the LocalSettings.php (don't forget to commit the result)...


 * change to the folder wiki/extensions/PerformanceMonitor
 * copy the file ServerPropellerbookImplementation.php and rename it in ServerMyServerImplementation.php
 * open it and adapt the paths
 * the Classname must also be changed to ServerMyServerImplementation (according to the file name)
 * open LocalServer.php and adapt the lines to include ServerMyServerImplementation.php and autoload the class:

What else?

 * possibly add a folder for the logfiles and give the server the rights to access it (the path mentioned in ServerMeinServerImplementation.php)