Merge "Added spaces before and removed spaces after 'array'"
[lhc/web/wiklou.git] / maintenance / benchmarks / benchmarkPurge.php
index 4d36d26..ec686b2 100644 (file)
@@ -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
 
 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)",