Extension:EnhancedReportTime

The EnhancedReportTime extension in HTML comment of generated pages, along with page generation time, displays request start time source ( or  ) and whether a predefined generation time limit (usually SLA requirement) is met.

Usage
After plugin installation on specified pages (or entire wiki) additional information about page generation time is shown.

This allows more effective usage of webpage monitoring software/services lacking configurable request timeouts, but offering page content checking. When using EnhancedReportTime such monitoring service can be set to check a page that is never cached and not publicly editable (e.g. Special:Version) and search for "SLA of XX secs met." in it. This way a basic request time monitoring can be achieved.

Download instructions
Download both .php files from GitHub (feel free to move this repository to MediaWiki Git) and place them in.

Note: stands for the root directory of your MediaWiki installation, the same directory that holds .

Installation
To load this extension, add the following to : Afterwards (if required) place configuration parameters in (default values are shown here):
 * If available, use request start timestamp from  instead of  . This should allow to count some more server overhead. Works on PHP 5.4.0+.
 * If available, use request start timestamp from  instead of  . This should allow to count some more server overhead. Works on PHP 5.4.0+.


 * Maximum allowed generation time for which to report that SLA is met. Setting this to 0 suppresses SLA message.
 * Maximum allowed generation time for which to report that SLA is met. Setting this to 0 suppresses SLA message.


 * Name of PHP function with additional tests. This function must return true on success or string with error message on failure. Error message will be displayed instead of SLA of XX secs met./SLA of XX secs NOT met. message. Execution time of this function is included in page generation time.
 * Name of PHP function with additional tests. This function must return true on success or string with error message on failure. Error message will be displayed instead of SLA of XX secs met./SLA of XX secs NOT met. message. Execution time of this function is included in page generation time.


 * Array with page names (see magic word ) where to enable EnhancedReportTime. Setting this to empty enables EnhancedReportTime on every page. Be aware of caching - use only non-cached pages for monitoring!
 * Array with page names (see magic word ) where to enable EnhancedReportTime. Setting this to empty enables EnhancedReportTime on every page. Be aware of caching - use only non-cached pages for monitoring!