Report enqueue stats as ms

The previous change to add new statsd metrics incorrectly reported
them as seconds rather than milliseconds; correct that.

Change-Id: I9d0dd293ef3d3fcee8025250ec628d85a52fba4e
This commit is contained in:
James E. Blair 2021-03-17 15:03:18 -07:00
parent 8a06dc9010
commit 4bb45bf2a0
1 changed files with 3 additions and 2 deletions

View File

@ -1564,8 +1564,9 @@ class PipelineManager(metaclass=ABCMeta):
self.sched.statsd.incr(key + '.total_changes')
if added and hasattr(item.event, 'arrived_at_scheduler_timestamp'):
now = time.time()
processing = now - item.event.arrived_at_scheduler_timestamp
elapsed = now - item.event.timestamp
arrived = item.event.arrived_at_scheduler_timestamp
processing = int((now - arrived) * 1000)
elapsed = int((now - item.event.timestamp) * 1000)
self.sched.statsd.timing(
basekey + '.event_enqueue_processing_time',
processing)