From e0ef4f556c4e2f836275e097e0c59a0a09bc7042 Mon Sep 17 00:00:00 2001 From: Ori Livneh Date: Thu, 21 May 2015 12:16:24 -0700 Subject: [PATCH] ProfilerOutputStats: replace single ':' with '.', too This maps 'hook: ' and 'query: ' to a metric name segment, instead of just a metric name prefix. Change-Id: I41fb71becbc862597b998c73ccfcaca5a3510ffc --- includes/profiler/output/ProfilerOutputStats.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/profiler/output/ProfilerOutputStats.php b/includes/profiler/output/ProfilerOutputStats.php index 0d7519170e..d816a01fe1 100644 --- a/includes/profiler/output/ProfilerOutputStats.php +++ b/includes/profiler/output/ProfilerOutputStats.php @@ -42,7 +42,7 @@ class ProfilerOutputStats extends ProfilerOutput { * @since 1.26 */ private static function normalizeMetricKey( $key ) { - $key = str_replace( '::', '.', $key ); + $key = preg_replace( '/[:.]+/', '.', $key ); $key = preg_replace( '/[^a-z.]+/i', '_', $key ); $key = trim( $key, '_.' ); return str_replace( array( '._', '_.' ), '.', $key ); -- 2.20.1