jobqueue: track real job inserts as 'inserts_actual'
authorOri Livneh <ori@wikimedia.org>
Thu, 22 Oct 2015 06:34:06 +0000 (23:34 -0700)
committerOri Livneh <ori@wikimedia.org>
Thu, 22 Oct 2015 06:45:55 +0000 (23:45 -0700)
The `inserts` metric includes dupes. `inserts_actual` will track the rate at
which the job queue is actually growing.

Change-Id: Ie7c544fc8e59180a204d1d149b6a23ac48b8abab

includes/jobqueue/JobQueueRedis.php

index 002fe0d..419ed0e 100644 (file)
@@ -224,6 +224,7 @@ class JobQueueRedis extends JobQueue {
                                throw new RedisException( "Could not insert {$failed} {$this->type} job(s)." );
                        }
                        JobQueue::incrStats( 'inserts', $this->type, count( $items ) );
+                       JobQueue::incrStats( 'inserts_actual', $pushed );
                        JobQueue::incrStats( 'dupe_inserts', $this->type,
                                count( $items ) - $failed - $pushed );
                } catch ( RedisException $e ) {