MediaWiki  REL1_19
BenchmarkPurge Class Reference
Inheritance diagram for BenchmarkPurge:
Collaboration diagram for BenchmarkPurge:

List of all members.

Public Member Functions

 __construct ()
 Default constructor.
 execute ()
 Do the actual work.

Private Member Functions

 benchSquid ($urls, $trials=1)
 Run a bunch of URLs through SquidUpdate::purge() to benchmark Squid response times.
 randomTitle ()
 Create a random title string (not necessarily a Title object).
 randomUrl ()
 Return a random URL of the wiki.
 randomUrlList ($length)
 Get an array of randomUrl()'s.

Detailed Description

Definition at line 26 of file benchmarkPurge.php.


Constructor & Destructor Documentation

Default constructor.

Children should call this *first* if implementing their own constructors

Reimplemented from Benchmarker.

Definition at line 28 of file benchmarkPurge.php.


Member Function Documentation

BenchmarkPurge::benchSquid ( urls,
trials = 1 
) [private]

Run a bunch of URLs through SquidUpdate::purge() to benchmark Squid response times.

Parameters:
$urlsarray A bunch of URLs to purge
$trialsint How many times to run the test?
Returns:
string

Definition at line 59 of file benchmarkPurge.php.

References $urls, SquidUpdate\purge(), and wfTime().

Referenced by execute().

Here is the call graph for this function:

Here is the caller graph for this function:

Do the actual work.

All child classes will need to implement this

Reimplemented from Maintenance.

Definition at line 33 of file benchmarkPurge.php.

References $urls, $wgSquidServers, $wgUseSquid, benchSquid(), Maintenance\error(), Maintenance\getOption(), Maintenance\hasOption(), Maintenance\output(), and randomUrlList().

Here is the call graph for this function:

Create a random title string (not necessarily a Title object).

For use with randomUrl().

Returns:
string

Definition at line 99 of file benchmarkPurge.php.

Referenced by randomUrl().

Here is the caller graph for this function:

Return a random URL of the wiki.

Not necessarily an actual title in the database, but at least a URL that looks like one.

Returns:
string

Definition at line 89 of file benchmarkPurge.php.

References $wgArticlePath, $wgServer, and randomTitle().

Referenced by randomUrlList().

Here is the call graph for this function:

Here is the caller graph for this function:

BenchmarkPurge::randomUrlList ( length) [private]

Get an array of randomUrl()'s.

Parameters:
$lengthint How many urls to add to the array
Returns:
array

Definition at line 76 of file benchmarkPurge.php.

References randomUrl().

Referenced by execute().

Here is the call graph for this function:

Here is the caller graph for this function:


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