Address review comments

This commit is contained in:
Joseph Schorr 2014-09-17 17:49:46 -04:00
parent 62f1f5f583
commit 43555af63d
2 changed files with 0 additions and 21 deletions

View file

@ -18,7 +18,6 @@ def _location_aware(unbound_func):
storage = self._storages[preferred] storage = self._storages[preferred]
if not storage: if not storage:
print locations
storage = self._storages[random.sample(locations, 1)[0]] storage = self._storages[random.sample(locations, 1)[0]]
storage_func = getattr(storage, unbound_func.__name__) storage_func = getattr(storage, unbound_func.__name__)

View file

@ -1,20 +0,0 @@
import logging
import json
import numpy
from app import app, storage as store
storage = store._storages['s3_us_east_1']
storage._initialize_cloud_conn()
sizes = []
for key in storage._cloud_bucket.list('logarchive'):
sizes.append(key.size)
array = numpy.array(sizes)
print 'Max: %s' % max(sizes)
print 'Min: %s' % min(sizes)
print 'Avg: %s' % (float(sum(sizes))/len(sizes))
print 'Median: %s' % numpy.median(array)
print 'Std: %s' % numpy.std(array)
print 'Percent <= 64k: %s' % (float(len([entry for entry in sizes if entry <= 64000]))/len(sizes))