Commit c2bd4e76 authored by Jean-Baptiste Mouret's avatar Jean-Baptiste Mouret
Browse files

misc

parent f1f573c7
......@@ -4,6 +4,7 @@ import subprocess
import time
import threading
from waflib import Logs
import plot_bo_benchmarks
json_ok = True
try:
......@@ -39,7 +40,8 @@ def run_bo_benchmarks(ctx):
Logs.pprint('NORMAL', '%s Running: %s for the %s th time %s' % (HEADER, fname, str(i), NC))
s="cd " + directory +";./" + fname
retcode = subprocess.call(s, shell=True, env=None)
# plot all
plot_bo_benchmarks.plot_all()
def compile_regression_benchmarks(bld, json_file):
......
......@@ -8,11 +8,7 @@ import brewer2mpl
bmap = brewer2mpl.get_map('Set2', 'qualitative', 8)
colors = bmap.mpl_colors
print len(colors)
print colors
params = {
'axes.labelsize' : 8,
'text.fontsize' : 8,
......@@ -25,7 +21,7 @@ params = {
rcParams.update(params)
def load_data():
files = glob("../benchmark_results/*/*/*.dat")
files = glob("benchmark_results/*/*/*.dat")
data = defaultdict(lambda : defaultdict(dict))
for f in files:
fs = f.split("/")
......@@ -102,12 +98,16 @@ def plot(func_name, data):
ax.set_yticklabels([])
ax.set_title("Wall clock time")
fig.savefig("../benchmark_results/" + func_name.split('.')[0] + ".png")
fig.savefig("benchmark_results/" + func_name.split('.')[0] + ".png")
def main():
def plot_all():
print('loading data...')
data = load_data()
print('data loaded')
for k in data.keys():
print('plotting for ' + k + '...')
plot(k, data)
main()
\ No newline at end of file
if __name__ == "__main__":
plot_all()
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment