Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(544)

Unified Diff: bench/bench_graph_svg.py

Issue 21157003: Adds links to dashboard plots for skp bench values out of range. (SkipBuildbotRuns). (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/bench_graph_svg.py
===================================================================
--- bench/bench_graph_svg.py (revision 10422)
+++ bench/bench_graph_svg.py (working copy)
@@ -376,12 +376,19 @@
float(elements[-1]))
def check_expectations(lines, expectations, newest_revision, key_suffix):
- """Check if there are benches in latest rev outside expected range."""
+ """Check if there are benches in latest rev outside expected range.
+ For exceptions, also outputs URL link for the dashboard plot.
+ The link history token format here only works for single-line plots.
+ """
+ # The platform for this bot, to pass to the dashboard plot.
+ platform = key_suffix[ : key_suffix.rfind('-')]
+ # Starting revision for the dashboard plot.
+ start_rev = str(newest_revision - 100) # Displays about 100 revisions.
exceptions = []
for line in lines:
line_str = str(line)
- bench_platform_key = (line_str[ : line_str.find('_{')] + ',' +
- key_suffix)
+ line_str = line_str[ : line_str.find('_{')]
+ bench_platform_key = line_str + ',' + key_suffix
this_revision, this_bench_value = lines[line][-1]
if (this_revision != newest_revision or
bench_platform_key not in expectations):
@@ -389,8 +396,19 @@
continue
this_min, this_max = expectations[bench_platform_key]
if this_bench_value < this_min or this_bench_value > this_max:
- exceptions.append('Bench %s value %s out of range [%s, %s].' %
- (bench_platform_key, this_bench_value, this_min, this_max))
+ link = ''
+ # For skp benches out of range, create dashboard plot link.
+ if line_str.find('.skp_') > 0:
+ # Extract bench and config for dashboard plot.
+ bench, config = line_str.strip('_').split('.skp_')
+ link = ' <a href="'
+ link += 'http://go/skpdash/SkpDash.html#%s~%s~%s~%s" ' % (
+ start_rev, bench, platform, config)
+ link += 'target="_blank">graph</a>'
borenet 2013/07/30 13:00:33 Do we need HTML here? AFAIK the output of this sc
benchen 2013/07/30 14:34:34 Thanks Eric. I tried to open a bench logs file wit
borenet 2013/07/30 14:47:45 SGTM
+ exception = 'Bench %s value %s out of range [%s, %s].%s' % (
+ bench_platform_key, this_bench_value, this_min, this_max,
+ link)
+ exceptions.append(exception)
if exceptions:
raise Exception('Bench values out of range:\n' +
'\n'.join(exceptions))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698