X-Git-Url: https://scripts.mit.edu/gitweb/autoinstallsdev/mediawiki.git/blobdiff_plain/87219ebd28426c6d21cb545233ee52f5f7af7dfd..18a6620945d02687fbcfc4c27355d952fd748b41:/maintenance/benchmarks/bench_HTTP_HTTPS.php diff --git a/maintenance/benchmarks/bench_HTTP_HTTPS.php b/maintenance/benchmarks/bench_HTTP_HTTPS.php new file mode 100644 index 00000000..13d15fce --- /dev/null +++ b/maintenance/benchmarks/bench_HTTP_HTTPS.php @@ -0,0 +1,38 @@ +bench( array( + array( 'function' => array( $this, 'getHTTP' ) ), + array( 'function' => array( $this, 'getHTTPS' ) ), + )); + print $this->getFormattedResults(); + } + + static function doRequest( $proto ) { + Http::get( "$proto://localhost/" ); + } + + // bench function 1 + function getHTTP() { + $this->doRequest( 'http' ); + } + + // bench function 2 + function getHTTPS() { + $this->doRequest( 'https' ); + } +} + +$maintClass = 'bench_HTTP_HTTPS'; +require_once( RUN_MAINTENANCE_IF_MAIN );