mDescription = "Benchmark HTTP request vs HTTPS request."; } public function execute() { $this->bench( array( array( 'function' => array( $this, 'getHTTP' ) ), array( 'function' => array( $this, 'getHTTPS' ) ), ) ); print $this->getFormattedResults(); } static function doRequest( $proto ) { Http::get( "$proto://localhost/", array(), __METHOD__ ); } // bench function 1 function getHTTP() { $this->doRequest( 'http' ); } // bench function 2 function getHTTPS() { $this->doRequest( 'https' ); } } $maintClass = 'BenchHttpHttps'; require_once RUN_MAINTENANCE_IF_MAIN;