Extension:EnhancedReportTime
EnhancedReportTime Release status: stable |
|||
---|---|---|---|
Implementation | Skin | ||
Description | Displays enhanced information about generation time of wiki pages | ||
Author(s) | Dāvis Mošenkovs (DavisNTtalk) | ||
Latest version | 1.0.1 (2013-08-19) | ||
MediaWiki | MW 1.21+ (most likely works also on older versions) | ||
Database changes | No | ||
License | GPLv2+ | ||
Download | Download instructions GitHub: Note: |
||
|
|||
|
|||
Translate the EnhancedReportTime extension if it is available at translatewiki.net |
|||
Check usage and version matrix; code metrics |
The EnhancedReportTime extension in HTML comment of generated pages, along with page generation time, displays request start time source ($wgRequestTime
or $_SERVER['REQUEST_TIME_FLOAT']
) and whether a predefined generation time limit (usually SLA requirement) is met.
Usage[edit | edit source]
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[edit | edit source]
Download both .php files from GitHub (feel free to move this repository to MediaWiki Git) and place them in $IP/extensions/EnhancedReportTime/
.
Note: $IP stands for the root directory of your MediaWiki installation, the same directory that holds LocalSettings.php.
Installation[edit | edit source]
To load this extension, add the following to LocalSettings.php:
require_once("$IP/extensions/EnhancedReportTime/EnhancedReportTime.php");
Afterwards (if required) place configuration parameters in LocalSettings.php (default values are shown here):
$wgERTUseServerStartTime = true;
- If available, use request start timestamp from
$_SERVER['REQUEST_TIME_FLOAT']
instead of$wgRequestTime
. This should allow to count some more server overhead. Works on PHP 5.4.0+. $wgERTSLATime = 10;
- Maximum allowed generation time for which to report that SLA is met. Setting this to 0 suppresses SLA message.
$wgERTTestFunction = ;
- 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.
$wgERTPages = array('Special:Version');
- Array with page names (see magic word {{FULLPAGENAME}}) where to enable EnhancedReportTime. Setting this to empty enables EnhancedReportTime on every page. Be aware of caching - use only non-cached pages for monitoring!