mirror of
https://github.com/codex-storage/das-research.git
synced 2025-02-23 16:28:27 +00:00
use itertools
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
parent
dc7a4d3c03
commit
49b1c239d7
@ -14,6 +14,7 @@ if needed.
|
||||
"""
|
||||
|
||||
import logging
|
||||
import itertools
|
||||
from DAS.shape import Shape
|
||||
|
||||
dumpXML = 1
|
||||
@ -57,14 +58,9 @@ deterministic = False
|
||||
randomSeed = "DAS"
|
||||
|
||||
def nextShape():
|
||||
for run in runs:
|
||||
for fr in failureRates:
|
||||
for chi in chis:
|
||||
for blockSize in blockSizes:
|
||||
for nv in numberValidators:
|
||||
for netDegree in netDegrees:
|
||||
for bwUplink in bwUplinks:
|
||||
# Network Degree has to be an even number
|
||||
if netDegree % 2 == 0:
|
||||
shape = Shape(blockSize, nv, fr, chi, netDegree, bwUplink, run)
|
||||
yield shape
|
||||
for run, fr, chi, blockSize, nv, netDegree, bwUplink in itertools.product(
|
||||
runs, failureRates, chis, blockSizes, numberValidators, netDegrees, bwUplinks):
|
||||
# Network Degree has to be an even number
|
||||
if netDegree % 2 == 0:
|
||||
shape = Shape(blockSize, nv, fr, chi, netDegree, bwUplink, run)
|
||||
yield shape
|
||||
|
Loading…
x
Reference in New Issue
Block a user