diff options
author | mh0310.choi <mh0310.choi@samsung.com> | 2015-07-28 10:46:57 +0900 |
---|---|---|
committer | mh0310.choi <mh0310.choi@samsung.com> | 2015-07-28 13:08:12 +0900 |
commit | 5e67a6f721eaedda61300baf0799199c7771ebd0 (patch) | |
tree | 6cd50b52498aab50e79b966cdccc2a137db316d9 /perf/make-html.py | |
parent | d3aeffba37161d2b76b29c4ea13369bd67a47a8e (diff) | |
download | cairo-5e67a6f721eaedda61300baf0799199c7771ebd0.tar.gz cairo-5e67a6f721eaedda61300baf0799199c7771ebd0.tar.bz2 cairo-5e67a6f721eaedda61300baf0799199c7771ebd0.zip |
Cairo version Upgrade for Tizen3.0submit/tizen_tv/20150728.091927submit/tizen_mobile/20150728.091912submit/tizen_common/20150728.091859accepted/tizen/tv/20150729.011254accepted/tizen/mobile/20150729.011230
- from 1.12.14 to 1.14.2
Change-Id: I3b62d212041b337bbb926d579f9ce74f42a45c3b
Diffstat (limited to 'perf/make-html.py')
-rwxr-xr-x | perf/make-html.py | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/perf/make-html.py b/perf/make-html.py new file mode 100755 index 000000000..0b4533581 --- /dev/null +++ b/perf/make-html.py @@ -0,0 +1,88 @@ +#!/usr/bin/python + +from string import strip +from sys import stdin + +targets = {} +smilies = {'slowdown': '☹' , 'speedup': '☺'} + +for line in stdin: + line = map(strip, filter(None, line.split(' '))) + + if 9 == len(line): + target, name = line[0:2] + factor, dir = line[-2:] + + name = name.split('-') + name, size = '-'.join(name[:-1]), name[-1] + + target_tests = targets.get(target, {}) + name_tests = target_tests.get(name, {}) + + name_tests[int(size)] = (factor, dir) + target_tests[name] = name_tests + targets[target] = target_tests + +print '''\ +<html><head> +<title>Performance Changes</title> +<style type="text/css">/*<![CDATA[*/ + body { background: white; color: black; } + table { border-collapse: collapse; } + + th, td { border: 1px solid silver; padding: 0.2em; } + td { text-align: center; } + th:first-child { text-align: left; } + th { background: #eee; } + + /* those colors also should work for color blinds */ + td.slowdown { background: #f93; } + td.speedup { background: #6f9; } +/*]]>*/</style> +</head><body> +<h1>Performance Changes</h1>''' + +targets = targets.items() +targets.sort(lambda a, b: cmp(a[0], b[0])) + +for target, names in targets: + sizes = {} + + for tests in names.values(): + for size in tests.keys(): + sizes[size] = True + + sizes = sizes.keys() + sizes.sort() + + names = names.items() + names.sort(lambda a, b: cmp(a[0], b[0])) + + print '<h2><a name="%s">%s</a></h2>' % (target, target) + print '<table><thead><tr><th> </th>' + + for size in sizes: + print '<th>%s</th>' % size + + print '</tr></thead><tbody>' + + for name, tests in names: + print '<tr><th>%s</th>' % name + + for size in sizes: + result = tests.get(size) + + if result: + factor, dir = result + print '<td class="%s">%s %s</td>' % ( + dir, factor, smilies[dir]) + + else: + print '<td> </td>' + + print '</tr>' + + + print '</tbody></table>' + +print '</body></html>' |