jobqueue: Pass count value delta instead of $type for the inserts_actual metric
authorTimo Tijhof <krinklemail@gmail.com>
Fri, 30 Oct 2015 06:08:37 +0000 (06:08 +0000)
committerTimo Tijhof <krinklemail@gmail.com>
Fri, 30 Oct 2015 06:08:37 +0000 (06:08 +0000)
Follows-up 4844595. Which wrongly passed the delta as $type parameter.
This resulted in the creation of "jobqueue.inserts_actual.50" and other
random buckets.

The "all" key also got incremented with 1, but doesn't reflect the actual
value in any meaningful way (besides the number of data points pushed
to statsd).

Change-Id: Ic93e06946ce3fcf0c21d2b7504fb10b3711c6e2b

includes/jobqueue/JobQueueRedis.php

index 1e957c2..deb5aa5 100644 (file)
@@ -219,7 +219,7 @@ class JobQueueRedis extends JobQueue {
                                }
                        }
                        JobQueue::incrStats( 'inserts', $this->type, count( $items ) );
-                       JobQueue::incrStats( 'inserts_actual', $pushed );
+                       JobQueue::incrStats( 'inserts_actual', $this->type, $pushed );
                        JobQueue::incrStats( 'dupe_inserts', $this->type,
                                count( $items ) - $failed - $pushed );
                        if ( $failed > 0 ) {