From deb8be995764c346ea9ad8db37111012879f27dd Mon Sep 17 00:00:00 2001 From: Tommi Virtanen Date: Wed, 20 Jul 2011 10:40:20 -0700 Subject: [PATCH] Make readwrite test put objects one by one, so it can report keys. --- s3tests/rand_readwrite.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/s3tests/rand_readwrite.py b/s3tests/rand_readwrite.py index 16fc35e..2b0b589 100644 --- a/s3tests/rand_readwrite.py +++ b/s3tests/rand_readwrite.py @@ -53,10 +53,19 @@ def writer(bucket, name, queue, file_size=1, file_stddev=0, file_name_seed=None) seed=r, ) + names = realistic.names( + mean=15, + stddev=4, + seed=r2, + ) + while True: fp = next(files) + objname = next(names) + key = bucket.new_key(objname) + start = time.time() - generate_objects.upload_objects(bucket, [fp], r2) + key.set_contents_from_file(fp) end = time.time() elapsed = end - start @@ -64,7 +73,7 @@ def writer(bucket, name, queue, file_size=1, file_stddev=0, file_name_seed=None) dict( type='w', bucket=bucket.name, - #TODO this current combines stats for multiple files? key=key.name, + key=key.name, #TODO chunks start=start, duration=int(round(elapsed * NANOSECOND)),