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)