Follow up r75446 : use a default for --count
authorAntoine Musso <hashar@users.mediawiki.org>
Tue, 26 Oct 2010 20:16:19 +0000 (20:16 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Tue, 26 Oct 2010 20:16:19 +0000 (20:16 +0000)
This also fix a division per zero error since $count was 0 and used to calculate average time.

maintenance/benchmarks/Benchmarker.php

index 9149ea2..9a9b533 100644 (file)
@@ -22,7 +22,7 @@ abstract class Benchmarker extends Maintenance {
 
        public function bench( array $benchs ) {
                $bench_number = 0;
-               $count = $this->getOption( 'count' );
+               $count = $this->getOption( 'count', 100 );
 
                foreach( $benchs as $bench ) {
                        // handle empty args