diff options
Diffstat (limited to 'maintenance/benchmarks/benchmarkPurge.php')
-rw-r--r-- | maintenance/benchmarks/benchmarkPurge.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/maintenance/benchmarks/benchmarkPurge.php b/maintenance/benchmarks/benchmarkPurge.php index e9d2ec7a..ec686b2a 100644 --- a/maintenance/benchmarks/benchmarkPurge.php +++ b/maintenance/benchmarks/benchmarkPurge.php @@ -1,6 +1,6 @@ <?php /** - * Squid purge benchmark script + * Benchmark for Squid purge. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -21,8 +21,13 @@ * @ingroup Benchmark */ -require_once( dirname( __FILE__ ) . '/Benchmarker.php' ); +require_once( __DIR__ . '/Benchmarker.php' ); +/** + * Maintenance script that benchmarks Squid purge. + * + * @ingroup Benchmark + */ class BenchmarkPurge extends Benchmarker { public function __construct() { @@ -57,11 +62,11 @@ class BenchmarkPurge extends Benchmarker { * @return string */ private function benchSquid( $urls, $trials = 1 ) { - $start = wfTime(); + $start = microtime( true ); for ( $i = 0; $i < $trials; $i++ ) { SquidUpdate::purge( $urls ); } - $delta = wfTime() - $start; + $delta = microtime( true ) - $start; $pertrial = $delta / $trials; $pertitle = $pertrial / count( $urls ); return sprintf( "%4d titles in %6.2fms (%6.2fms each)", |