dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "HTMLForm: Do not generate wrappers for empty sections"
[lhc/web/wiklou.git]
/
maintenance
/
benchmarks
/
benchmarkPurge.php
diff --git
a/maintenance/benchmarks/benchmarkPurge.php
b/maintenance/benchmarks/benchmarkPurge.php
index
42c1eb7
..
e006cf5
100644
(file)
--- a/
maintenance/benchmarks/benchmarkPurge.php
+++ b/
maintenance/benchmarks/benchmarkPurge.php
@@
-31,7
+31,7
@@
require_once __DIR__ . '/Benchmarker.php';
class BenchmarkPurge extends Benchmarker {
public function __construct() {
parent::__construct();
class BenchmarkPurge extends Benchmarker {
public function __construct() {
parent::__construct();
- $this->
mDescription = "Benchmark the Squid purge functions."
;
+ $this->
addDescription( 'Benchmark the Squid purge functions.' )
;
}
public function execute() {
}
public function execute() {
@@
-41,9
+41,9
@@
class BenchmarkPurge extends Benchmarker {
} else {
$this->output( "There are " . count( $wgSquidServers ) . " defined squid servers:\n" );
if ( $this->hasOption( 'count' ) ) {
} else {
$this->output( "There are " . count( $wgSquidServers ) . " defined squid servers:\n" );
if ( $this->hasOption( 'count' ) ) {
- $lengths =
array( intval( $this->getOption( 'count' ) ) )
;
+ $lengths =
[ intval( $this->getOption( 'count' ) ) ]
;
} else {
} else {
- $lengths =
array( 1, 10, 100 )
;
+ $lengths =
[ 1, 10, 100 ]
;
}
foreach ( $lengths as $length ) {
$urls = $this->randomUrlList( $length );
}
foreach ( $lengths as $length ) {
$urls = $this->randomUrlList( $length );
@@
-63,7
+63,7
@@
class BenchmarkPurge extends Benchmarker {
private function benchSquid( $urls, $trials = 1 ) {
$start = microtime( true );
for ( $i = 0; $i < $trials; $i++ ) {
private function benchSquid( $urls, $trials = 1 ) {
$start = microtime( true );
for ( $i = 0; $i < $trials; $i++ ) {
-
Squid
Update::purge( $urls );
+
CdnCache
Update::purge( $urls );
}
$delta = microtime( true ) - $start;
$pertrial = $delta / $trials;
}
$delta = microtime( true ) - $start;
$pertrial = $delta / $trials;
@@
-79,7
+79,7
@@
class BenchmarkPurge extends Benchmarker {
* @return array
*/
private function randomUrlList( $length ) {
* @return array
*/
private function randomUrlList( $length ) {
- $list =
array()
;
+ $list =
[]
;
for ( $i = 0; $i < $length; $i++ ) {
$list[] = $this->randomUrl();
}
for ( $i = 0; $i < $length; $i++ ) {
$list[] = $this->randomUrl();
}