From c1f9b1f7b1b77776192048005dcc66dcf3df2bfb Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 27 Dec 2014 15:41:37 +0100 Subject: Update to MediaWiki 1.24.1 --- maintenance/benchmarks/benchmarkHooks.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'maintenance/benchmarks/benchmarkHooks.php') diff --git a/maintenance/benchmarks/benchmarkHooks.php b/maintenance/benchmarks/benchmarkHooks.php index 3f5d6db0..fb25b9d9 100644 --- a/maintenance/benchmarks/benchmarkHooks.php +++ b/maintenance/benchmarks/benchmarkHooks.php @@ -29,7 +29,6 @@ require_once __DIR__ . '/Benchmarker.php'; * @ingroup Benchmark */ class BenchmarkHooks extends Benchmarker { - public function __construct() { parent::__construct(); $this->mDescription = 'Benchmark MediaWiki Hooks.'; @@ -46,13 +45,13 @@ class BenchmarkHooks extends Benchmarker { $time = $this->benchHooks(); $this->output( 'Loaded (one) hook: ' . $time . "\n" ); - for( $i = 0; $i < 9; $i++ ) { + for ( $i = 0; $i < 9; $i++ ) { $wgHooks['Test'][] = array( $this, 'test' ); } $time = $this->benchHooks(); $this->output( 'Loaded (ten) hook: ' . $time . "\n" ); - for( $i = 0; $i < 90; $i++ ) { + for ( $i = 0; $i < 90; $i++ ) { $wgHooks['Test'][] = array( $this, 'test' ); } $time = $this->benchHooks(); @@ -61,7 +60,7 @@ class BenchmarkHooks extends Benchmarker { } /** - * @param $trials int + * @param int $trials * @return string */ private function benchHooks( $trials = 10 ) { @@ -71,6 +70,7 @@ class BenchmarkHooks extends Benchmarker { } $delta = microtime( true ) - $start; $pertrial = $delta / $trials; + return sprintf( "Took %6.3fms", $pertrial * 1000 ); } -- cgit v1.2.3-54-g00ecf