From: Brion Vibber Date: Sat, 22 Jan 2005 01:25:53 +0000 (+0000) Subject: So single trial; add --count option for number of titles to do (otherwise does three... X-Git-Tag: 1.5.0alpha1~873 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/modifier.php?a=commitdiff_plain;h=82eb4c634f8adc646b3a47251b334e4ece5a9e95;p=lhc%2Fweb%2Fwiklou.git So single trial; add --count option for number of titles to do (otherwise does three sets 1,10,100 which is not accurate for setup time) --- diff --git a/maintenance/benchmarkPurge.php b/maintenance/benchmarkPurge.php index bc31b9bf4b..19cd88ccf6 100644 --- a/maintenance/benchmarkPurge.php +++ b/maintenance/benchmarkPurge.php @@ -42,11 +42,15 @@ if( !$wgUseSquid ) { die( "Squid purge benchmark doesn't do much without squid support on.\n" ); } else { printf( "There are %d defined squid servers:\n", count( $wgSquidServers ) ); - echo implode( "\n", $wgSquidServers ) . "\n"; - $lengths = array( 1, 10, 100 ); + #echo implode( "\n", $wgSquidServers ) . "\n"; + if( isset( $options['count'] ) ) { + $lengths = array( IntVal( $options['count'] ) ); + } else { + $lengths = array( 1, 10, 100 ); + } foreach( $lengths as $length ) { $urls = randomUrlList( $length ); - $trial = benchSquid( $urls, 4 ); + $trial = benchSquid( $urls ); print "$trial\n"; } }