forked from TrueCloudLab/s3-tests
Make readwrite test put objects one by one, so it can report keys.
This commit is contained in:
parent
9e707b897d
commit
deb8be9957
1 changed files with 11 additions and 2 deletions
|
@ -53,10 +53,19 @@ def writer(bucket, name, queue, file_size=1, file_stddev=0, file_name_seed=None)
|
||||||
seed=r,
|
seed=r,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
names = realistic.names(
|
||||||
|
mean=15,
|
||||||
|
stddev=4,
|
||||||
|
seed=r2,
|
||||||
|
)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
fp = next(files)
|
fp = next(files)
|
||||||
|
objname = next(names)
|
||||||
|
key = bucket.new_key(objname)
|
||||||
|
|
||||||
start = time.time()
|
start = time.time()
|
||||||
generate_objects.upload_objects(bucket, [fp], r2)
|
key.set_contents_from_file(fp)
|
||||||
end = time.time()
|
end = time.time()
|
||||||
elapsed = end - start
|
elapsed = end - start
|
||||||
|
|
||||||
|
@ -64,7 +73,7 @@ def writer(bucket, name, queue, file_size=1, file_stddev=0, file_name_seed=None)
|
||||||
dict(
|
dict(
|
||||||
type='w',
|
type='w',
|
||||||
bucket=bucket.name,
|
bucket=bucket.name,
|
||||||
#TODO this current combines stats for multiple files? key=key.name,
|
key=key.name,
|
||||||
#TODO chunks
|
#TODO chunks
|
||||||
start=start,
|
start=start,
|
||||||
duration=int(round(elapsed * NANOSECOND)),
|
duration=int(round(elapsed * NANOSECOND)),
|
||||||
|
|
Loading…
Reference in a new issue