14 import matplotlib.pyplot
as plt
18 logfile = open(filename)
22 for line
in logfile.readlines():
24 name = line.split(
"SUCCESS")[0]
25 runtime[name] = float(line.split(
"runtime of")[1])
26 if name
in nOfInstances:
27 number = nOfInstances[name]
30 nOfInstances[name] = number + 1
35 x.append(runtime[name])
36 y.append(nOfInstances[name])
38 ax = fig.add_subplot(111)
41 plt.xlabel(
"Runtime (s)")
42 plt.ylabel(
"# instances")
44 "Requested algorithm instances with 10 events and 10 threads in parallel."
46 plt.savefig(
"test.pdf")
51 name = name.rstrip(
".time")
52 threads, events, algos = name.split(
"_")[1:]
63 for filename
in os.listdir(path):
64 if filename.startswith(config)
and filename.endswith(
"time"):
65 ff = open(os.path.join(path, filename))
66 time = ff.read().rstrip(
"\n")
68 timings.append(timing)
72 ax = fig.add_subplot(111)
75 for timing
in timings:
76 if timing.events == 1:
77 times.append(timing.time)
78 algos.append(timing.algos)
80 plt.xlabel(
"Max algos in parallel")
81 plt.ylabel(
"runtime (s)")
82 plt.title(
"Brunel / CPUCruncher profiling.")
84 plt.savefig(
"timing.pdf")
88 if __name__ ==
"__main__":