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