X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=maintenance%2Fbenchmarks%2Fbench_HTTP_HTTPS.php;h=5e1feb739bf1e3f35dda140aedde11438fccf72c;hb=10b49f7ef0f27caac1c9dfdba8de2c6935f5f55b;hp=40a877f8f09528797e1c59f530debe4f4221442d;hpb=592637225a4d5db5abcdc288d838c160284eef08;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/benchmarks/bench_HTTP_HTTPS.php b/maintenance/benchmarks/bench_HTTP_HTTPS.php index 40a877f8f0..5e1feb739b 100644 --- a/maintenance/benchmarks/bench_HTTP_HTTPS.php +++ b/maintenance/benchmarks/bench_HTTP_HTTPS.php @@ -38,27 +38,26 @@ class BenchHttpHttps extends Benchmarker { } public function execute() { - $this->bench( array( - array( 'function' => array( $this, 'getHTTP' ) ), - array( 'function' => array( $this, 'getHTTPS' ) ), - ) ); - print $this->getFormattedResults(); + $this->bench( [ + [ 'function' => [ $this, 'getHTTP' ] ], + [ 'function' => [ $this, 'getHTTPS' ] ], + ] ); } - static function doRequest( $proto ) { - Http::get( "$proto://localhost/", array(), __METHOD__ ); + private function doRequest( $proto ) { + Http::get( "$proto://localhost/", [], __METHOD__ ); } // bench function 1 - function getHTTP() { + protected function getHTTP() { $this->doRequest( 'http' ); } // bench function 2 - function getHTTPS() { + protected function getHTTPS() { $this->doRequest( 'https' ); } } -$maintClass = 'BenchHttpHttps'; +$maintClass = BenchHttpHttps::class; require_once RUN_MAINTENANCE_IF_MAIN;