mirror of
https://github.com/ceph/s3-tests.git
synced 2024-11-25 13:47:27 +00:00
Use itertools.islice instead of special-casing generator slicing.
This commit is contained in:
parent
fdaead938e
commit
91e3918ef5
1 changed files with 5 additions and 3 deletions
|
@ -4,6 +4,7 @@ import gevent
|
|||
import gevent.pool
|
||||
import gevent.queue
|
||||
import gevent.monkey; gevent.monkey.patch_all()
|
||||
import itertools
|
||||
import optparse
|
||||
import sys
|
||||
import time
|
||||
|
@ -147,12 +148,13 @@ def main():
|
|||
# setup bucket and other objects
|
||||
bucket = common.get_new_bucket()
|
||||
print "Created bucket: {name}".format(name=bucket.name)
|
||||
file_names = list(realistic.names(
|
||||
file_names = realistic.names(
|
||||
mean=15,
|
||||
stddev=4,
|
||||
seed=options.seed,
|
||||
max_amount=config.files.num
|
||||
))
|
||||
)
|
||||
file_names = itertools.islice(file_names, config.files.num)
|
||||
file_names = list(file_names)
|
||||
files = realistic.files(
|
||||
mean=1024 * config.files.size,
|
||||
stddev=1024 * config.files.stddev,
|
||||
|
|
Loading…
Reference in a new issue