Add chunk size metric

This commit is contained in:
Brad Ison 2016-12-15 13:20:16 -05:00
parent 8f59ac1251
commit df7366eace
2 changed files with 6 additions and 0 deletions

View file

@ -199,6 +199,8 @@ def put_image_layer(namespace, repository, image_id):
try:
start_time = time()
store.stream_write(locations, path, sr)
metric_queue.chunk_size.Observe(size_info.compressed_size,
labelvalues=[list(locations)[0]])
metric_queue.chunk_upload_time.Observe(time() - start_time,
labelvalues=[list(locations)[0]])
except IOError: