class BenchmarkHooks extends Benchmarker {
public function __construct() {
parent::__construct();
- $this->mDescription = 'Benchmark MediaWiki Hooks.';
+ $this->addDescription( 'Benchmark MediaWiki Hooks.' );
}
public function execute() {
private function benchHooks( $trials = 10 ) {
$start = microtime( true );
for ( $i = 0; $i < $trials; $i++ ) {
- wfRunHooks( 'Test' );
+ Hooks::run( 'Test' );
}
$delta = microtime( true ) - $start;
$pertrial = $delta / $trials;