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

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

Issue 9949044: Refactor dromeao driver to skip broken tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 | « no previous file | 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 b5bee0e08dc8e917cad5d5e8a6af831edb4d72a8..708f4b584eca5566a2ac4377906134678a11ad6e 100755
--- a/tools/testing/perf_testing/run_perf_tests.py
+++ b/tools/testing/perf_testing/run_perf_tests.py
@@ -549,22 +549,61 @@ class BrowserStandalonePerformanceTest(PerformanceTest):
# TODO(vsm): This should not be hardcoded here if possible.
-def get_dromaeo_benchmarks():
- return map(lambda str: str.replace(' ', '_'),
- ['getAttribute', 'element.property', 'setAttribute',
- 'element.property = value', 'createElement', 'createTextNode',
- 'innerHTML', 'cloneNode', 'appendChild', 'insertBefore',
- 'getElementById', 'getElementById (not in document)',
- 'getElementsByTagName(div)', 'getElementsByTagName(p)',
- 'getElementsByTagName(a)', 'getElementsByTagName(*)',
- 'getElementsByTagName (not in document)', 'getElementsByName',
- 'getElementsByName (not in document)', 'firstChild', 'lastChild',
- 'nextSibling', 'previousSibling', 'childNodes'])
+DROMAEO_BENCHMARKS = {
+ 'attr': ('attributes', [
+ 'getAttribute',
+ 'element.property',
+ 'setAttribute',
+ 'element.property = value']),
+ 'modify': ('modify', [
+ 'createElement',
+ 'createTextNode',
+ 'innerHTML',
+ 'cloneNode',
+ 'appendChild',
+ 'insertBefore']),
+ 'query': ('query', [
+ 'getElementById',
+ 'getElementById (not in document)',
+ 'getElementsByTagName(div)',
+ 'getElementsByTagName(p)',
+ 'getElementsByTagName(a)',
+ 'getElementsByTagName(*)',
+ 'getElementsByTagName (not in document)',
+ 'getElementsByName',
+ 'getElementsByName (not in document)']),
+ 'traverse': ('traverse', [
+ 'firstChild',
+ 'lastChild',
+ 'nextSibling',
+ 'previousSibling',
+ 'childNodes'])
+}
+
+# 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.
+def get_valid_dromaeo_tags():
+ tags = [tag for (tag, _) in DROMAEO_BENCHMARKS.values()]
+ if platform.system() == 'Darwin':
+ tags.remove('modify')
+ return tags
+def get_dromaeo_benchmarks():
+ valid = get_valid_dromaeo_tags()
+ 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)
def get_dromaeo_versions():
return ['js', 'frog_dom', 'frog_html']
+def get_dromaeo_url_query(version):
+ version = version.replace('_','&')
+ tags = get_valid_dromaeo_tags()
+ return '|'.join([ '%s&%s' % (version, tag) for tag in tags])
+
class DromaeoTest(PerformanceTest):
"""Runs Dromaeo tests, in the browser."""
def __init__(self):
@@ -586,7 +625,7 @@ class DromaeoTest(PerformanceTest):
for browser in get_browsers():
for version_name in versions:
- version = version_name.replace('_','&')
+ version = get_dromaeo_url_query(version_name)
self.trace_file = os.path.join('tools', 'testing', 'perf_testing',
self.result_folder_name,
'dromaeo-%s-%s-%s' % (self.cur_time, browser, version_name))
@@ -642,7 +681,7 @@ class DromaeoSizeTest(TestRunner):
super(DromaeoSizeTest, self).__init__(
DROMAEO_SIZE,
['browser'], ['dart', 'frog_dom', 'frog_html', 'frog_htmlidiomatic'],
- ['attr', 'modify', 'query', 'traverse'])
+ DROMAEO_BENCHMARK.keys())
def run_tests(self):
# Build tests.
@@ -667,7 +706,7 @@ class DromaeoSizeTest(TestRunner):
for (variant, _) in variants:
total_size[variant] = 0
total_dart_size = 0
- for suite in ['attr', 'modify', 'query', 'traverse']:
+ for suite in DROMAEO_BENCHMARK.keys():
dart_size = 0
try:
dart_size = os.path.getsize(os.path.join(test_path,
@@ -741,7 +780,7 @@ class DromaeoSizeTest(TestRunner):
'Compiled Dromaeo Sizes',
'Size (in bytes)', 10, 10, 'lower left', png_filename,
['browser'], ['dart', 'frog_dom', 'frog_html', 'frog_htmlidiomatic'],
- ['attr', 'modify', 'query', 'traverse'])
+ DROMEAO_BENCHMARK.keys())
self.style_and_save_perf_plot(
'Compiled Dromaeo Sizes',
« 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