def testAuto(num_sw=16, num_port=48, num_group=4, num_tries=10000, control_threshold=0.9): """Run an automatic test with given parameters. Generate group randomly, and send traffic randomly with control_threshold @param num_sw: Number of switches in the datacenter @param num_port: Number of ports of each switch @param num_group: Number of groups in the datacenter @param num_tries: Number of random tests @param control_threshold: How many percent flows are cross-group """ dc = DC(Flat(num_sw=num_sw, num_port=num_port)) dc.genGroupRandom(num_group=num_group) dc.testShuffleTraffic(num_tries, control_threshold) dc.showInfo() dc.showStat()