aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/bench_graph_svg.py
diff options
context:
space:
mode:
authorGravatar bensong@google.com <bensong@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-07-30 14:47:04 +0000
committerGravatar bensong@google.com <bensong@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-07-30 14:47:04 +0000
commit43e4f6ef799184812433384794f3f9b1b64db149 (patch)
treed88af224f3d49236d901d56af9764a1f462b63b5 /bench/bench_graph_svg.py
parent72761f031ff8bbe0228264757d5a6cfe95c83e82 (diff)
Adds links to dashboard plots for skp bench values out of range. (SkipBuildbotRuns).
They are single-line plots for the specific bench/platform/config combos. Review URL: https://codereview.chromium.org/21157003 git-svn-id: http://skia.googlecode.com/svn/trunk@10437 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'bench/bench_graph_svg.py')
-rw-r--r--bench/bench_graph_svg.py28
1 files changed, 23 insertions, 5 deletions
diff --git a/bench/bench_graph_svg.py b/bench/bench_graph_svg.py
index 7d03a2aefe..da18dc9a87 100644
--- a/bench/bench_graph_svg.py
+++ b/bench/bench_graph_svg.py
@@ -376,12 +376,19 @@ def main():
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 @@ def main():
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>'
+ 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))