summaryrefslogtreecommitdiff
path: root/includes/profiler/Profiler.php
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:32:59 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:32:59 -0400
commit6dc1997577fab2c366781fd7048144935afa0012 (patch)
tree8918d28c7ab4342f0738985e37af1dfc42d0e93a /includes/profiler/Profiler.php
parent150f94f051128f367bc89f6b7e5f57eb2a69fc62 (diff)
parentfa89acd685cb09cdbe1c64cbb721ec64975bbbc1 (diff)
Merge commit 'fa89acd'
# Conflicts: # .gitignore # extensions/ArchInterWiki.sql
Diffstat (limited to 'includes/profiler/Profiler.php')
-rw-r--r--includes/profiler/Profiler.php26
1 files changed, 22 insertions, 4 deletions
diff --git a/includes/profiler/Profiler.php b/includes/profiler/Profiler.php
index dbf80fa1..9fd5a364 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).
@@ -231,6 +234,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.
* @return string
@@ -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