16 import matplotlib.pyplot
as plt
20 logfile = open(filename)
24 for line
in logfile.readlines():
26 name = line.split(
"SUCCESS")[0]
27 runtime[name] = float(line.split(
"runtime of")[1])
28 if name
in nOfInstances:
29 number = nOfInstances[name]
32 nOfInstances[name] = number + 1
37 x.append(runtime[name])
38 y.append(nOfInstances[name])
40 ax = fig.add_subplot(111)
43 plt.xlabel(
"Runtime (s)")
44 plt.ylabel(
"# instances")
46 "Requested algorithm instances with 10 events and 10 threads in parallel."
48 plt.savefig(
"test.pdf")
53 name = name.rstrip(
".time")
54 threads, events, algos = name.split(
"_")[1:]
65 for filename
in os.listdir(path):
66 if filename.startswith(config)
and filename.endswith(
"time"):
67 ff = open(os.path.join(path, filename))
68 time = ff.read().rstrip(
"\n")
70 timings.append(timing)
74 ax = fig.add_subplot(111)
77 for timing
in timings:
78 if timing.events == 1:
79 times.append(timing.time)
80 algos.append(timing.algos)
82 plt.xlabel(
"Max algos in parallel")
83 plt.ylabel(
"runtime (s)")
84 plt.title(
"Brunel / CPUCruncher profiling.")
86 plt.savefig(
"timing.pdf")
90 if __name__ ==
"__main__":