class ComparisonExperiment(Experiment):
outputs = { 'cool_data' : CSV_File('cool.csv'),
'treetab_data' : CSV_File('treetab.csv'),
+ 'gmul_data' : CSV_File('gmul.csv'),
'graphs' : Directory('graphs')
}
inputs = { 'cool' : CoolExperiment(),
- 'treetab' : TreeTabExperiment()
+ 'treetab' : TreeTabExperiment(),
+ 'gmul' : GMULExperiment()
}
def folder_to_csv(self, folder, csv):
def run(self):
self.folder_to_csv(self.inputs.cool.timing.path, self.outputs.cool_data)
self.folder_to_csv(self.inputs.treetab.timing.path, self.outputs.treetab_data)
+ self.folder_to_csv(self.inputs.gmul.timing.path, self.outputs.gmul_data)
with self.outputs.graphs as path:
+ samplecount = len(self.outputs.cool_data.value)
# Time
plt.title("Time spent: %s" %
os.path.basename(self.inputs.treetab.metadata['formulas']))
plt.yscale('log')
plt.ylabel('time / s')
plt.xlabel('problem size')
- plt.plot(range(1,21),
+ plt.plot([x[0].split('.')[1] for x in self.outputs.cool_data.value],
[x[1] for x in self.outputs.cool_data.value],
'bo', label="cool")
- plt.plot(range(1,21),
+ plt.plot([x[0].split('.')[1] for x in self.outputs.treetab_data.value],
[x[1] for x in self.outputs.treetab_data.value],
'gv', label="TreeTab")
plt.legend()
+ plt.plot([x[0].split('.')[1] for x in self.outputs.gmul_data.value],
+ [x[1] for x in self.outputs.gmul_data.value],
+ 'r*', label="GMUL")
+
plt.savefig('time.svg', format='svg')
plt.close()
plt.yscale('log')
plt.ylabel('memory / kB')
plt.xlabel('problem size')
- plt.plot(range(1,21),
+ plt.plot([x[0].split('.')[1] for x in self.outputs.cool_data.value],
[x[2] for x in self.outputs.cool_data.value],
'bo', label="cool")
- plt.plot(range(1,21),
+ plt.plot([x[0].split('.')[1] for x in self.outputs.treetab_data.value],
[x[2] for x in self.outputs.treetab_data.value],
'gv', label="TreeTab")
plt.legend()
+ plt.plot([x[0].split('.')[1] for x in self.outputs.gmul_data.value],
+ [x[2] for x in self.outputs.gmul_data.value],
+ 'r*', label="GMUL")
+
plt.savefig('memory.svg', format='svg')