X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fprofiler%2FProfilerXhprof.php;h=1bf4f545833044096c7b965aef9b5fb57844ec10;hb=689c847a32e7fe8a0b3a559a88a627a252c5018e;hp=8fc0b778da82b7ba2ed4b281b1bdbf8944ed56e6;hpb=57eaa2bf04ce1b48bd89c10defe4de5b7d31f047;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/profiler/ProfilerXhprof.php b/includes/profiler/ProfilerXhprof.php index 8fc0b778da..ffa441ed87 100644 --- a/includes/profiler/ProfilerXhprof.php +++ b/includes/profiler/ProfilerXhprof.php @@ -22,14 +22,14 @@ * Profiler wrapper for XHProf extension. * * @code - * $wgProfiler['class'] = 'ProfilerXhprof'; + * $wgProfiler['class'] = ProfilerXhprof::class; * $wgProfiler['flags'] = XHPROF_FLAGS_NO_BUILTINS; * $wgProfiler['output'] = 'text'; * $wgProfiler['visible'] = true; * @endcode * * @code - * $wgProfiler['class'] = 'ProfilerXhprof'; + * $wgProfiler['class'] = ProfilerXhprof::class; * $wgProfiler['flags'] = XHPROF_FLAGS_CPU | XHPROF_FLAGS_MEMORY | XHPROF_FLAGS_NO_BUILTINS; * $wgProfiler['output'] = 'udp'; * @endcode @@ -43,12 +43,16 @@ * ($wgProfiler['exclude']) containing an array of function names. * Shell-style patterns are also accepted. * - * @author Bryan Davis - * @copyright © 2014 Bryan Davis and Wikimedia Foundation. + * It is also possible to use the Tideways PHP extension, which is mostly + * a drop-in replacement for Xhprof. Just change the XHPROF_FLAGS_* constants + * to TIDEWAYS_FLAGS_*. + * + * @copyright © 2014 Wikimedia Foundation and contributors * @ingroup Profiler * @see Xhprof * @see https://php.net/xhprof * @see https://github.com/facebook/hhvm/blob/master/hphp/doc/profiling.md + * @see https://github.com/tideways/php-profiler-extension */ class ProfilerXhprof extends Profiler { /** @@ -196,7 +200,7 @@ class ProfilerXhprof extends Profiler { */ protected function getFunctionReport() { $data = $this->getFunctionStats(); - usort( $data, function( $a, $b ) { + usort( $data, function ( $a, $b ) { if ( $a['real'] === $b['real'] ) { return 0; }