* The delay time should not count
Bug: T102743
Change-Id: I9e8b1f33b65681fd9f4f667233bce280bf6f227d
: null;
}
+ /**
+ * @return int|null UNIX timestamp of when the job was runnable, or null
+ * @since 1.26
+ */
+ public function getReadyTimestamp() {
+ return $this->getReleaseTimestamp() ?: $this->getQueuedTimestamp();
+ }
+
/**
* Whether the queue should reject insertion of this job if a duplicate exists
*
$timeMsTotal += $timeMs;
$profiler->scopedProfileOut( $psection );
- $queuedTs = $job->getQueuedTimestamp();
- if ( $queuedTs ) {
+ $readyTs = $job->getReadyTimestamp();
+ if ( $readyTs ) {
// Record time to run for the job type
- $pickupDelay = $popTime - $queuedTs;
+ $pickupDelay = $popTime - $readyTs;
$stats->timing( 'jobqueue.pickup_delay.all', $pickupDelay );
$stats->timing( "jobqueue.pickup_delay.$jType", $pickupDelay );
}