Skip to content

Commit

Permalink
Dashboard: Touch up timing distributions
Browse files Browse the repository at this point in the history
  • Loading branch information
oschuett committed Apr 10, 2019
1 parent b436df0 commit e3a505f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions tools/dashboard/generate_dashboard.py
Expand Up @@ -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
Expand Down Expand Up @@ -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']:
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tools/regtesting/timings.py
Expand Up @@ -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)
Expand Down

0 comments on commit e3a505f

Please sign in to comment.