From: Gilles Dubuc Date: Mon, 6 Apr 2015 08:40:15 +0000 (+0200) Subject: Track request method in dbperformance.log X-Git-Tag: 1.31.0-rc.0~11837 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/categories/modifier.php?a=commitdiff_plain;h=7b2d50e761dc46d85e37e044b1be8fd03be0a3f4;p=lhc%2Fweb%2Fwiklou.git 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 --- 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 ) ); } }