Merge "Fix executeTiming statsd metrics"
[lhc/web/wiklou.git] / maintenance / benchmarks / bench_HTTP_HTTPS.php
index bb7499b..5b64bee 100644 (file)
@@ -34,19 +34,19 @@ require_once __DIR__ . '/Benchmarker.php';
 class BenchHttpHttps extends Benchmarker {
        public function __construct() {
                parent::__construct();
-               $this->mDescription = "Benchmark HTTP request vs HTTPS request.";
+               $this->addDescription( 'Benchmark HTTP request vs HTTPS request.' );
        }
 
        public function execute() {
-               $this->bench( array(
-                       array( 'function' => array( $this, 'getHTTP' ) ),
-                       array( 'function' => array( $this, 'getHTTPS' ) ),
-               ) );
+               $this->bench( [
+                       [ 'function' => [ $this, 'getHTTP' ] ],
+                       [ 'function' => [ $this, 'getHTTPS' ] ],
+               ] );
                print $this->getFormattedResults();
        }
 
        static function doRequest( $proto ) {
-               Http::get( "$proto://localhost/" );
+               Http::get( "$proto://localhost/", [], __METHOD__ );
        }
 
        // bench function 1