From 7d3fca19ef65cca520e3e76685ae9eff85e7ed75 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Thu, 13 Nov 2014 13:01:25 -0800 Subject: [PATCH] Avoid sending spammy @X xhprof entries over UDP Change-Id: I8509932f7368cab2a5426f437845e2849a82d9b4 --- includes/profiler/ProfilerXhprof.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/profiler/ProfilerXhprof.php b/includes/profiler/ProfilerXhprof.php index 1e83e27c47..5e70aa9e81 100644 --- a/includes/profiler/ProfilerXhprof.php +++ b/includes/profiler/ProfilerXhprof.php @@ -284,6 +284,9 @@ class ProfilerXhprof extends Profiler { $buffer = ''; $bufferSize = 0; foreach ( $metrics as $func => $data ) { + if ( strpos( $func, '@' ) !== false ) { + continue; // ignore cyclic re-entries to functions + } $line = sprintf( $wgUDPProfilerFormatString, $this->getProfileID(), $data['ct'], -- 2.20.1