Aaron Schulz has uploaded a new change for review.
https://gerrit.wikimedia.org/r/209788
Change subject: Include transaction details log entry for total write time
violations in the profiler
......................................................................
Include transaction details log entry for total write time violations in the
profiler
* This makes it possible to see what is being done by matching
the trx IDs of the (normally) adjacent log entries
Change-Id: I515de99acfe159856930d8e259c00eb744f43213
---
M includes/profiler/TransactionProfiler.php
1 file changed, 4 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/88/209788/1
diff --git a/includes/profiler/TransactionProfiler.php
b/includes/profiler/TransactionProfiler.php
index 3f4d58b..46d6119 100644
--- a/includes/profiler/TransactionProfiler.php
+++ b/includes/profiler/TransactionProfiler.php
@@ -254,10 +254,14 @@
$this->logger->info( "Detected no transaction for
'$name' - out of sync." );
return;
}
+
+ $slow = false;
+
// Warn if too much time was spend writing...
if ( $writeTime > $this->expect['writeQueryTime'] ) {
$this->reportExpectationViolated( 'writeQueryTime',
"[transaction $id writes to {$server} ({$db})]"
);
+ $slow = true;
}
// Fill in the last non-query period...
$lastQuery = end( $this->dbTrxMethodTimes[$name] );
@@ -269,7 +273,6 @@
}
}
// Check for any slow queries or non-query periods...
- $slow = false;
foreach ( $this->dbTrxMethodTimes[$name] as $info ) {
$elapsed = ( $info[2] - $info[1] );
if ( $elapsed >= $this->dbLockThreshold ) {
--
To view, visit https://gerrit.wikimedia.org/r/209788
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I515de99acfe159856930d8e259c00eb744f43213
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits