MediaWiki  REL1_20
BenchmarkPurge Class Reference

Maintenance script that benchmarks Squid purge. More...

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

Maintenance script that benchmarks Squid purge.

Definition at line 31 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 33 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 64 of file benchmarkPurge.php.

References $urls, and SquidUpdate\purge().

Referenced by execute().

Do the actual work.

All child classes will need to implement this

Reimplemented from Maintenance.

Definition at line 38 of file benchmarkPurge.php.

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

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

For use with randomUrl().

Returns:
string

Definition at line 104 of file benchmarkPurge.php.

Referenced by randomUrl().

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 94 of file benchmarkPurge.php.

References $wgArticlePath, and randomTitle().

Referenced by randomUrlList().

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 81 of file benchmarkPurge.php.

References randomUrl().

Referenced by execute().


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