MediaWiki  master
SectionProfileCallback.php
Go to the documentation of this file.
1 <?php
22 
29 class SectionProfileCallback extends ScopedCallback {
31  protected $profiler;
33  protected $section;
34 
40  parent::__construct( null );
41  $this->profiler = $profiler;
42  $this->section = $section;
43  }
44 
45  function __destruct() {
46  $this->profiler->profileOutInternal( $this->section );
47  }
48 }
Custom PHP profiler for parser/DB type section names that xhprof/xdebug can&#39;t handle.
__construct(SectionProfiler $profiler, $section)
Subclass ScopedCallback to avoid call_user_func_array(), which is slow.