X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/?a=blobdiff_plain;f=includes%2Fprofiler%2FProfiler.php;h=9fd5a36470d01ef5172fa106df86876364cd8e8f;hb=c099155a17d26f03799a9ba085d7b5b912b186e2;hp=dbf80fa13b99d5347c695dabf693ac2ed767bc71;hpb=6dae212c2e8e5eab4340144a7097e075af4dbf8a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/profiler/Profiler.php b/includes/profiler/Profiler.php index dbf80fa13b..9fd5a36470 100644 --- a/includes/profiler/Profiler.php +++ b/includes/profiler/Profiler.php @@ -145,8 +145,11 @@ abstract class Profiler { } // Kept BC for now, remove when possible - public function profileIn( $functionname ) {} - public function profileOut( $functionname ) {} + public function profileIn( $functionname ) { + } + + public function profileOut( $functionname ) { + } /** * Mark the start of a custom profiling frame (e.g. DB queries). @@ -230,6 +233,21 @@ abstract class Profiler { } } + /** + * Output current data to the page output if configured to do so + * + * @throws MWException + * @since 1.26 + */ + public function logDataPageOutputOnly() { + foreach ( $this->getOutputs() as $output ) { + if ( $output instanceof ProfilerOutputText ) { + $stats = $this->getFunctionStats(); + $output->log( $stats ); + } + } + } + /** * Get the content type sent out to the client. * Used for profilers that output instead of store data. @@ -279,9 +297,9 @@ abstract class Profiler { * @return array List of method entries arrays, each having: * - name : method name * - calls : the number of invoking calls - * - real : real time ellapsed (ms) + * - real : real time elapsed (ms) * - %real : percent real time - * - cpu : CPU time ellapsed (ms) + * - cpu : CPU time elapsed (ms) * - %cpu : percent CPU time * - memory : memory used (bytes) * - %memory : percent memory used