From 82eb4c634f8adc646b3a47251b334e4ece5a9e95 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sat, 22 Jan 2005 01:25:53 +0000 Subject: [PATCH] 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) --- maintenance/benchmarkPurge.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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"; } } -- 2.20.1