MediaWiki REL1_39
SectionProfileCallback.php
Go to the documentation of this file.
1<?php
20use Wikimedia\ScopedCallback;
21
28class SectionProfileCallback extends ScopedCallback {
30 protected $profiler;
32 protected $section;
33
39 parent::__construct( null );
40 $this->profiler = $profiler;
41 $this->section = $section;
42 }
43
44 public function __destruct() {
45 $this->profiler->profileOutInternal( $this->section );
46 }
47}
Subclass ScopedCallback to avoid call_user_func_array(), which is slow.
__construct(SectionProfiler $profiler, $section)
Arbitrary section name based PHP profiling.