summaryrefslogtreecommitdiff
path: root/includes/profiler/output/ProfilerOutputStats.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/profiler/output/ProfilerOutputStats.php')
-rw-r--r--includes/profiler/output/ProfilerOutputStats.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/includes/profiler/output/ProfilerOutputStats.php b/includes/profiler/output/ProfilerOutputStats.php
index ef6ef7c9..52aa54ac 100644
--- a/includes/profiler/output/ProfilerOutputStats.php
+++ b/includes/profiler/output/ProfilerOutputStats.php
@@ -37,13 +37,11 @@ class ProfilerOutputStats extends ProfilerOutput {
* @param array $stats
*/
public function log( array $stats ) {
+ $prefix = isset( $this->params['prefix'] ) ? $this->params['prefix'] : '';
$contextStats = $this->collector->getContext()->getStats();
foreach ( $stats as $stat ) {
- // Sanitize the key
- $key = str_replace( '::', '.', $stat['name'] );
- $key = preg_replace( '/[^a-z.]+/i', '_', $key );
- $key = trim( $key, '_.' );
+ $key = "{$prefix}.{$stat['name']}";
// Convert fractional seconds to whole milliseconds
$cpu = round( $stat['cpu'] * 1000 );