addDescription( 'Benchmark HTTP request vs HTTPS request.' ); } public function execute() { $this->bench( [ [ 'function' => [ $this, 'getHTTP' ] ], [ 'function' => [ $this, 'getHTTPS' ] ], ] ); } private function doRequest( $proto ) { Http::get( "$proto://localhost/", [], __METHOD__ ); } // bench function 1 protected function getHTTP() { $this->doRequest( 'http' ); } // bench function 2 protected function getHTTPS() { $this->doRequest( 'https' ); } } $maintClass = BenchHttpHttps::class; require_once RUN_MAINTENANCE_IF_MAIN;