jobqueue: track real job inserts as 'inserts_actual'

The `inserts` metric includes dupes. `inserts_actual` will track the rate at
which the job queue is actually growing.

Change-Id: Ie7c544fc8e59180a204d1d149b6a23ac48b8abab
This commit is contained in:
Ori Livneh 2015-10-21 23:34:06 -07:00
parent a8131cac85
commit 4844595add

View 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 ) {