Gilles has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/202042

Change subject: Track request method in dbperformance.log
......................................................................

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
---
M includes/profiler/TransactionProfiler.php
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/42/202042/1

diff --git a/includes/profiler/TransactionProfiler.php 
b/includes/profiler/TransactionProfiler.php
index b313558..a84ffa0 100644
--- a/includes/profiler/TransactionProfiler.php
+++ b/includes/profiler/TransactionProfiler.php
@@ -248,9 +248,12 @@
         * @param string $query
         */
        protected function reportExpectationViolated( $expect, $query ) {
+               global $wgRequest;
+
                $n = $this->expect[$expect];
                $by = $this->expectBy[$expect];
+
                wfDebugLog( 'DBPerformance',
-                       "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 ) );
        }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/202042
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia7437d00f5b89a8e318d85659d60e2f9f9f26149
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.25wmf23
Gerrit-Owner: Gilles <gdu...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to