From e3a505f4a5848014a356206e923e9f34b1f459a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Sch=C3=BCtt?= Date: Wed, 10 Apr 2019 15:15:39 +0200 Subject: [PATCH] Dashboard: Touch up timing distributions --- tools/dashboard/generate_dashboard.py | 7 ++++--- tools/regtesting/timings.py | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/dashboard/generate_dashboard.py b/tools/dashboard/generate_dashboard.py index b33d9a0a06..b6eb3f8f91 100755 --- a/tools/dashboard/generate_dashboard.py +++ b/tools/dashboard/generate_dashboard.py @@ -24,6 +24,7 @@ from pathlib import Path import requests import hashlib +from collections import OrderedDict import matplotlib as mpl mpl.use('Agg') # change backend, to run without X11 @@ -264,11 +265,11 @@ def gen_plots(archive_reports, log, outdir, full_archive): ordered_reports = [archive_reports[sha] for sha in ordered_shas if sha in archive_reports] # collect plot data - plots = {} + plots = OrderedDict() for report in ordered_reports: for p in report['plots']: if(p['name'] not in plots.keys()): - plots[p['name']] = {'curves':{}} + plots[p['name']] = {'curves': OrderedDict()} plots[p['name']]['title'] = p['title'] # update title plots[p['name']]['ylabel'] = p['ylabel'] # update label for pp in report['plotpoints']: @@ -319,7 +320,7 @@ def gen_plots(archive_reports, log, outdir, full_archive): ax.set_xlabel('Commit Age') ax.set_ylabel(p['ylabel']) markers = itertools.cycle('os>^*') - for cname in sorted(p['curves'].keys()): + for cname in p['curves'].keys(): c = p['curves'][cname] if(full_archive): ax.plot(c['x'], c['y'], label=c['label'], linewidth=2) # less crowded diff --git a/tools/regtesting/timings.py b/tools/regtesting/timings.py index ed7f5711a3..430f5f0e3e 100755 --- a/tools/regtesting/timings.py +++ b/tools/regtesting/timings.py @@ -17,7 +17,7 @@ def main(): with open(filename) as fhandle: timings = sorted(float(line.split()[0]) for line in fhandle.readlines()) - print('Plot: name="timings", title="Timings Distribution", ylabel="time [s]"') + print('Plot: name="timings", title="Timing Distribution", ylabel="time [s]"') tmpl = 'PlotPoint: name="{}th_percentile", plot="timings", label="{}th %ile", y={}, yerr=0.0' for p in (100, 99, 98, 95, 90, 80): v = percentile(timings, p / 100.0)