Aaron Schulz has uploaded a new change for review.
https://gerrit.wikimedia.org/r/231858
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(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/58/231858/1
diff --git a/includes/jobqueue/JobRunner.php b/includes/jobqueue/JobRunner.php
index 2465e5a..c462cdd 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', $pickupDelay );
$stats->timing(
"jobqueue.pickup_delay.$jType", $pickupDelay );
}
+ $stats->timing( "jobqueue.run.$jType", $timeMs
/ 1000 );
// 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: newchange
Gerrit-Change-Id: I73caffad0e0d31d9ffbd3c0decfe31e17ea85398
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