diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2015-12-17 09:15:42 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2015-12-17 09:44:51 +0100 |
commit | a1789ddde42033f1b05cc4929491214ee6e79383 (patch) | |
tree | 63615735c4ddffaaabf2428946bb26f90899f7bf /includes/profiler/output/ProfilerOutputStats.php | |
parent | 9e06a62f265e3a2aaabecc598d4bc617e06fa32d (diff) |
Update to MediaWiki 1.26.0
Diffstat (limited to 'includes/profiler/output/ProfilerOutputStats.php')
-rw-r--r-- | includes/profiler/output/ProfilerOutputStats.php | 6 |
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 ); |