diff options
author | epoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-02-14 18:58:05 +0000 |
---|---|---|
committer | epoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-02-14 18:58:05 +0000 |
commit | 2459a394b83e35c47778d74f876d0606329568b9 (patch) | |
tree | 33a4676eaf1a91a9f0a1d1f5a349f171104b3123 /bench | |
parent | 5d0a7692da32ae50d639b9ef3cf99724e3b112ac (diff) |
bench_graph_svg: generate output in consistently sorted order, to make diffs more useful
TBR=benchen
Review URL: https://codereview.appspot.com/7330044
git-svn-id: http://skia.googlecode.com/svn/trunk@7744 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'bench')
-rw-r--r-- | bench/bench_graph_svg.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/bench/bench_graph_svg.py b/bench/bench_graph_svg.py index 5a9978a343..e6aa2e9056 100644 --- a/bench/bench_graph_svg.py +++ b/bench/bench_graph_svg.py @@ -187,7 +187,7 @@ def redirect_stdout(output_path): def create_lines(revision_data_points, settings , bench_of_interest, config_of_interest, time_of_interest , time_to_ignore): - """Convert revision data into sorted line data. + """Convert revision data into a dictionary of line data. ({int:[BenchDataPoints]}, {str:str}, str?, str?, str?) -> {Label:[(x,y)] | [n].x <= [n+1].x}""" @@ -890,8 +890,16 @@ def output_svg(lines, regressions, requested_width, requested_height): } } //]]></script>""" + + # Add a new element to each item in the 'lines' list: the label in string + # form. Then use that element to sort the list. + sorted_lines = [] for label, line in lines.items(): - print '<g id=%s>' % qa(label) + sorted_lines.append([str(label), label, line]) + sorted_lines.sort() + + for label_as_string, label, line in sorted_lines: + print '<g id=%s>' % qa(label_as_string) r = 128 g = 128 b = 128 |