68 def replaceValues(cfg_name, n, eif, aif, nthreads, scale, clone, dumpQueues, verbosity):
69 newcfglines = open(cfg_name,
"r").readlines()
70 cfg_name = cfg_name.replace(
".py",
"")
73 verb =
"_v%s" % verbosity
76 scale_s =
"_s%s" % scale
77 newcfgname =
"measurement_%s_n%s_eif%s_aif%s_nthreads%s_c%s_dq%s%s%s.py" % (
88 newcfg = open(newcfgname,
"w")
89 for line
in newcfglines:
91 "NumberOfEvents" in line
92 and "NUMBEROFEVENTS" in line
93 and "FLIGHT" not in line
95 line = line.replace(
"NUMBEROFEVENTS", str(n))
96 if "NumberOfEventsInFlight" in line
and "NUMBEROFEVENTSINFLIGHT" in line:
97 line = line.replace(
"NUMBEROFEVENTSINFLIGHT", str(eif))
98 if "NumberOfAlgosInFlight" in line
and "NUMBEROFALGOSINFLIGHT" in line:
99 line = line.replace(
"NUMBEROFALGOSINFLIGHT", str(aif))
100 if "NumberOfThreads" in line
and "NUMBEROFTHREADS" in line:
101 line = line.replace(
"NUMBEROFTHREADS", str(nthreads))
102 if "DumpQueues" in line
and "DUMPQUEUES" in line:
103 line = line.replace(
"DUMPQUEUES", str(dumpQueues))
104 if "CloneAlgos" in line
and "CLONEALGOS" in line:
105 line = line.replace(
"CLONEALGOS", str(clone))
106 if "Verbosity" in line
and "VERBOSITY" in line:
107 line = line.replace(
"VERBOSITY", str(verbosity))
108 if "Scale" in line
and "SCALE" in line:
109 line = line.replace(
"SCALE", str(scale))