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

Unified Diff: tools/testing/perf_testing/run_perf_tests.py

Issue 10012046: Normalize droameo benchmarks to legal filenames in perf runner script (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix name on parsing Created 8 years, 8 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 | « tools/testing/perf_testing/dromaeo.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/perf_testing/run_perf_tests.py
diff --git a/tools/testing/perf_testing/run_perf_tests.py b/tools/testing/perf_testing/run_perf_tests.py
index 94b0677de026e627ed507e4ec8b6c10c446e7b69..9bb248cd49fc1fb8eb6cae01ae27c5f700855d3c 100755
--- a/tools/testing/perf_testing/run_perf_tests.py
+++ b/tools/testing/perf_testing/run_perf_tests.py
@@ -586,6 +586,19 @@ DROMAEO_BENCHMARKS = {
'childNodes'])
}
+# Use legal appengine filenames for benchmark names.
+def legalize_filename(str):
+ remap = {
+ ' ': '_',
+ '(': '_',
+ ')': '_',
+ '*': 'ALL',
+ '=': 'ASSIGN',
+ }
+ for (old, new) in remap.iteritems():
+ str = str.replace(old, new)
+ return str
+
# TODO(vsm): This is a hack to skip breaking tests. Triage this
# failure properly. The modify suite fails on 32-bit chrome on
# the mac.
@@ -600,7 +613,7 @@ def get_dromaeo_benchmarks():
benchmarks = reduce(lambda l1,l2: l1+l2,
[tests for (tag, tests) in
DROMAEO_BENCHMARKS.values() if tag in valid])
- return map(lambda str: str.replace(' ', '_'), benchmarks)
+ return map(legalize_filename, benchmarks)
def get_dromaeo_versions():
return ['js', 'frog_dom', 'frog_html']
@@ -672,14 +685,14 @@ class DromaeoTest(PerformanceTest):
if results:
for result in results:
r = re.match(result_pattern, result)
- name = r.group(1).strip(':').replace(' ', '_')
+ name = legalize_filename(r.group(1).strip(':'))
score = float(r.group(2))
bench_dict[name] += [float(score)]
self.revision_dict[browser][version][name] += [revision_num]
f.close()
self.calculate_geometric_mean(browser, version, revision_num)
-
+
class DromaeoSizeTest(TestRunner):
"""Run tests to determine the compiled file output size of Dromaeo."""
« no previous file with comments | « tools/testing/perf_testing/dromaeo.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698