70 def replaceValues(cfg_name, n, eif, aif, nthreads, scale, clone, dumpQueues,
73 newcfglines = open(cfg_name,
"r").readlines()
74 cfg_name = cfg_name.replace(
".py",
"")
77 verb =
"_v%s" % verbosity
80 scale_s =
"_s%s" % scale
81 newcfgname =
"measurement_%s_n%s_eif%s_aif%s_nthreads%s_c%s_dq%s%s%s.py" % (
82 cfg_name, n, eif, aif, nthreads, clone, dumpQueues, scale_s, verb)
83 newcfg = open(newcfgname,
"w")
84 for line
in newcfglines:
85 if (
'NumberOfEvents' in line
and 'NUMBEROFEVENTS' in line
86 and not "FLIGHT" in line):
87 line = line.replace(
"NUMBEROFEVENTS", str(n))
88 if (
'NumberOfEventsInFlight' in line
89 and 'NUMBEROFEVENTSINFLIGHT' in line):
90 line = line.replace(
"NUMBEROFEVENTSINFLIGHT", str(eif))
91 if (
'NumberOfAlgosInFlight' in line
92 and 'NUMBEROFALGOSINFLIGHT' in line):
93 line = line.replace(
"NUMBEROFALGOSINFLIGHT", str(aif))
94 if (
'NumberOfThreads' in line
and 'NUMBEROFTHREADS' in line):
95 line = line.replace(
"NUMBEROFTHREADS", str(nthreads))
96 if (
'DumpQueues' in line
and 'DUMPQUEUES' in line):
97 line = line.replace(
"DUMPQUEUES", str(dumpQueues))
98 if (
'CloneAlgos' in line
and 'CLONEALGOS' in line):
99 line = line.replace(
"CLONEALGOS", str(clone))
100 if (
'Verbosity' in line
and 'VERBOSITY' in line):
101 line = line.replace(
"VERBOSITY", str(verbosity))
102 if (
'Scale' in line
and 'SCALE' in line):
103 line = line.replace(
"SCALE", str(scale))