MediaWiki  REL1_24
BenchmarkParse Class Reference

Maintenance script to benchmark how long it takes to parse a given title at an optionally specified timestamp. More...

Inheritance diagram for BenchmarkParse:
Collaboration diagram for BenchmarkParse:

List of all members.

Public Member Functions

 __construct ()
 execute ()
 getRevIdForTime (Title $title, $timestamp)
 Fetch the ID of the revision of a Title that occurred.
 onFetchTemplate (Parser $parser, Title $title, &$skip, &$id)
 Hook into the parser's revision ID fetcher.
 runParser (Revision $revision)
 Parse the text from a given Revision.

Private Attributes

array $idCache = array()
 Cache that maps a Title DB key to revision ID for the requested timestamp *.
string $templateTimestamp = null
 MediaWiki concatenated string timestamp (YYYYMMDDHHMMSS) *.

Detailed Description

Maintenance script to benchmark how long it takes to parse a given title at an optionally specified timestamp.

Since:
1.23

Definition at line 33 of file benchmarkParse.php.


Constructor & Destructor Documentation

Reimplemented from Maintenance.

Definition at line 38 of file benchmarkParse.php.


Member Function Documentation

Reimplemented from Maintenance.

Definition at line 55 of file benchmarkParse.php.

BenchmarkParse::getRevIdForTime ( Title title,
timestamp 
)

Fetch the ID of the revision of a Title that occurred.

Parameters:
Title$title
string$timestamp
Returns:
bool|string Revision ID, or false if not found or error

Definition at line 118 of file benchmarkParse.php.

BenchmarkParse::onFetchTemplate ( Parser parser,
Title title,
&$  skip,
&$  id 
)

Hook into the parser's revision ID fetcher.

Make sure that the parser only uses revisions around the specified timestamp.

Parameters:
Parser$parser
Title$title
bool&$skip
string | bool&$id
Returns:
bool

Definition at line 157 of file benchmarkParse.php.

Parse the text from a given Revision.

Parameters:
Revision$revision

Definition at line 142 of file benchmarkParse.php.


Member Data Documentation

array BenchmarkParse::$idCache = array() [private]

Cache that maps a Title DB key to revision ID for the requested timestamp *.

Definition at line 36 of file benchmarkParse.php.

string BenchmarkParse::$templateTimestamp = null [private]

MediaWiki concatenated string timestamp (YYYYMMDDHHMMSS) *.

Definition at line 34 of file benchmarkParse.php.


The documentation for this class was generated from the following file: