mirror of
https://github.com/ceph/s3-tests.git
synced 2024-11-29 03:41:48 +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.pool
|
||||||
import gevent.queue
|
import gevent.queue
|
||||||
import gevent.monkey; gevent.monkey.patch_all()
|
import gevent.monkey; gevent.monkey.patch_all()
|
||||||
|
import itertools
|
||||||
import optparse
|
import optparse
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
|
@ -147,12 +148,13 @@ def main():
|
||||||
# setup bucket and other objects
|
# setup bucket and other objects
|
||||||
bucket = common.get_new_bucket()
|
bucket = common.get_new_bucket()
|
||||||
print "Created bucket: {name}".format(name=bucket.name)
|
print "Created bucket: {name}".format(name=bucket.name)
|
||||||
file_names = list(realistic.names(
|
file_names = realistic.names(
|
||||||
mean=15,
|
mean=15,
|
||||||
stddev=4,
|
stddev=4,
|
||||||
seed=options.seed,
|
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(
|
files = realistic.files(
|
||||||
mean=1024 * config.files.size,
|
mean=1024 * config.files.size,
|
||||||
stddev=1024 * config.files.stddev,
|
stddev=1024 * config.files.stddev,
|
||||||
|
|
Loading…
Reference in a new issue