From 7b2d50e761dc46d85e37e044b1be8fd03be0a3f4 Mon Sep 17 00:00:00 2001 From: Gilles Dubuc Date: Mon, 6 Apr 2015 10:40:15 +0200 Subject: [PATCH] Track request method in dbperformance.log This will allow us to avoid needlessly investigating master requests that only happen on POST (which is already what we want for multi-DC). Bug: T92357 Change-Id: Ia7437d00f5b89a8e318d85659d60e2f9f9f26149 --- includes/profiler/TransactionProfiler.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/profiler/TransactionProfiler.php b/includes/profiler/TransactionProfiler.php index baec181789..f02d66f8d3 100644 --- a/includes/profiler/TransactionProfiler.php +++ b/includes/profiler/TransactionProfiler.php @@ -263,10 +263,12 @@ class TransactionProfiler implements LoggerAwareInterface { * @param string $query */ protected function reportExpectationViolated( $expect, $query ) { + global $wgRequest; + $n = $this->expect[$expect]; $by = $this->expectBy[$expect]; $this->logger->info( - "Expectation ($expect <= $n) by $by not met:\n$query\n" . wfBacktrace( true ) + "[{$wgRequest->getMethod()}] Expectation ($expect <= $n) by $by not met:\n$query\n" . wfBacktrace( true ) ); } } -- 2.20.1