class BenchmarkPurge extends Benchmarker {
public function __construct() {
parent::__construct();
- $this->mDescription = "Benchmark the Squid purge functions.";
+ $this->addDescription( 'Benchmark the Squid purge functions.' );
}
public function execute() {
} else {
$this->output( "There are " . count( $wgSquidServers ) . " defined squid servers:\n" );
if ( $this->hasOption( 'count' ) ) {
- $lengths = array( intval( $this->getOption( 'count' ) ) );
+ $lengths = [ intval( $this->getOption( 'count' ) ) ];
} else {
- $lengths = array( 1, 10, 100 );
+ $lengths = [ 1, 10, 100 ];
}
foreach ( $lengths as $length ) {
$urls = $this->randomUrlList( $length );
* @return array
*/
private function randomUrlList( $length ) {
- $list = array();
+ $list = [];
for ( $i = 0; $i < $length; $i++ ) {
$list[] = $this->randomUrl();
}