本文整理汇总了Python中Model.Model.nv_1方法的典型用法代码示例。如果您正苦于以下问题:Python Model.nv_1方法的具体用法?Python Model.nv_1怎么用?Python Model.nv_1使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Model.Model
的用法示例。
在下文中一共展示了Model.nv_1方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: defaultTests
# 需要导入模块: from Model import Model [as 别名]
# 或者: from Model.Model import nv_1 [as 别名]
def defaultTests(columns="", verbosity="default"):
""" create and run a set of standard test scenarios """
# note the key background parameters
m = Model("")
misc = ", %d/%ds, %s/%s/s" % (m.time_timeout, m.time_detect,
printSize(m.rate_mirror, 1000),
printSize(m.rate_flush, 1000))
# create a list of tests to be run
mlist = list()
# run tests for all the interesting combinations
for cp in (1, 2, 3):
for primary in (" v", "nv"):
sList = ["none"] if cp == 1 else [" v", "nv", "symmetric"]
for secondary in sList:
# suppress irrelevent combinations
if primary == "nv" and secondary == " v":
continue
# figure out how to caption this configuration
if secondary == "symmetric":
desc = ("symmetric: %d %s cp" % (cp, primary))
elif (cp > 1):
desc = ("prim: %s %d %s cp" %
(primary, cp - 1, secondary))
else:
desc = "prim: %s 0 cp" % (primary)
# instantiate the model
m = Model(desc + misc)
m.copies = cp
m.nv_1 = (primary == "nv")
m.cache_1 = 4 * GB
if secondary == "symmetric":
m.symmetric = True
m.cache_1 *= cp
m.nv_2 = (primary == "nv")
m.cache_2 = 0
elif cp > 1:
m.nv_2 = (secondary == "nv")
m.cache_2 = 40 * GB
mlist.append(m)
# run all the specified models
run(mlist, columns, verbosity)