jenkins-bot has submitted this change and it was merged.
Change subject: Switched job run time profiling to context getStats()
......................................................................
Switched job run time profiling to context getStats()
* This replaces the scoped profiling calls
Change-Id: I73caffad0e0d31d9ffbd3c0decfe31e17ea85398
---
M includes/jobqueue/JobRunner.php
1 file changed, 2 insertions(+), 5 deletions(-)
Approvals:
Ori.livneh: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/jobqueue/JobRunner.php b/includes/jobqueue/JobRunner.php
index ac5a6fd..700a63d 100644
--- a/includes/jobqueue/JobRunner.php
+++ b/includes/jobqueue/JobRunner.php
@@ -109,10 +109,8 @@
return $response;
}
- $profiler = Profiler::instance();
-
// Catch huge single updates that lead to slave lag
- $trxProfiler = $profiler->getTransactionProfiler();
+ $trxProfiler = Profiler::instance()->getTransactionProfiler();
$trxProfiler->setLogger( LoggerFactory::getInstance(
'DBPerformance' ) );
$trxProfiler->setExpectations(
$wgTrxProfilerLimits['JobRunner'], __METHOD__ );
@@ -176,7 +174,6 @@
$this->debugCallback( $msg );
// Run the job...
- $psection = $profiler->scopedProfileIn(
__METHOD__ . '-' . $jType );
$jobStartTime = microtime( true );
try {
++$jobsPopped;
@@ -197,7 +194,6 @@
wfGetLBFactory()->commitAll();
$timeMs = intval( ( microtime( true ) -
$jobStartTime ) * 1000 );
$timeMsTotal += $timeMs;
- $profiler->scopedProfileOut( $psection );
$readyTs = $job->getReadyTimestamp();
if ( $readyTs ) {
@@ -206,6 +202,7 @@
$stats->timing(
'jobqueue.pickup_delay.all', 1000 * $pickupDelay );
$stats->timing(
"jobqueue.pickup_delay.$jType", 1000 * $pickupDelay );
}
+ $stats->timing( "jobqueue.run.$jType", $timeMs
);
// Mark the job as done on success or when the
job cannot be retried
if ( $status !== false || !$job->allowRetries()
) {
--
To view, visit https://gerrit.wikimedia.org/r/231858
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I73caffad0e0d31d9ffbd3c0decfe31e17ea85398
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits