mirror of
https://github.com/ceph/s3-tests.git
synced 2024-12-25 03:56:35 +00:00
Revert "adding max_amount to realistic.names generator"
This is now unused code. This reverts commit 52ba1d4fbf9b3547f8fd27199cf2c4f2c59dbd45.
This commit is contained in:
parent
91e3918ef5
commit
3b204bfbdc
1 changed files with 1 additions and 7 deletions
|
@ -137,13 +137,12 @@ def files(mean, stddev, seed=None):
|
|||
break
|
||||
yield RandomContentFile(size=size, seed=rand.getrandbits(32))
|
||||
|
||||
def names(mean, stddev, charset=None, seed=None, max_amount=None):
|
||||
def names(mean, stddev, charset=None, seed=None):
|
||||
"""
|
||||
Yields strings that are somewhat plausible as file names, where
|
||||
the lenght of each filename follows the normal distribution with
|
||||
`mean` and `stddev`.
|
||||
"""
|
||||
count = 0
|
||||
if charset is None:
|
||||
charset = string.ascii_lowercase
|
||||
rand = random.Random(seed)
|
||||
|
@ -155,11 +154,6 @@ def names(mean, stddev, charset=None, seed=None, max_amount=None):
|
|||
name = ''.join(rand.choice(charset) for _ in xrange(length))
|
||||
yield name
|
||||
|
||||
count += 1
|
||||
if count == max_amount:
|
||||
return
|
||||
|
||||
|
||||
def files_varied(groups, unlimited=False):
|
||||
""" Yields a weighted-random selection of file-like objects. """
|
||||
# Quick data type sanity.
|
||||
|
|
Loading…
Reference in a new issue