Index: generate_perf.py |
diff --git a/generate_perf.py b/generate_perf.py |
index 6b3a8e7cc27f5a718f77c63ebc0d761326ea5ff7..e0da8cec6b8e13f0aae7e1c0612de6c04a4e5099 100755 |
--- a/generate_perf.py |
+++ b/generate_perf.py |
@@ -110,14 +110,28 @@ ChromeSystemTitles = { |
'chrome-vista-quad-core': 'Vista Quad Core', |
} |
+# These are long-running endure tests that have differently-shaped graphs. |
+EndureSystemTitles = { |
+ 'endure-linux-dbg': 'Endure Linux Debug', |
+ 'endure-linux-rel': 'Endure Linux Release', |
+} |
+ |
TestTitles = { |
'avperf': 'Audio Video Perf', |
'av_perf': 'Audio Video Perf 2', |
'bloat-http': 'Bloat - HTTP', |
'chrome_frame_perf': 'Chrome Frame Perf', |
+ 'control-testControlAttachDetachDOMTree': |
+ 'Control Test: ControlAttachDetachDOMTree', |
+ 'control-testControlAttachDetachDOMTreeWebDriver': |
+ 'Control Test: ControlAttachDetachDOMTreeWebDriver', |
'coverage': 'Code Coverage', |
'database': 'Page Cycler Database', |
'dhtml': 'Page Cycler DHTML', |
+ 'docs-testDocsAlternatelyClickLists': |
+ 'Docs Test: DocsAlternatelyClickLists', |
+ 'docs_wpr-testDocsAlternatelyClickLists': |
+ 'Docs WPR Test: DocsAlternatelyClickLists', |
'dom_perf': 'Dom', |
'dromaeo_domcoreattr': 'Dromaeo DOMCore attr', |
'dromaeo_domcoremodify': 'Dromaeo DOMCore modify', |
@@ -134,12 +148,30 @@ TestTitles = { |
'dromaeo_jslibtraversejquery': 'Dromaeo JSLib traverse jquery', |
'dromaeo_jslibtraverseprototype': 'Dromaeo JSLib traverse prototype', |
'frame_rate': 'Frame Rate', |
+ 'gmail-testGmailComposeDiscard': |
+ 'Gmail Test: GmailComposeDiscard', |
+ 'gmail-testGmailAlternateThreadlistConversation': |
+ 'Gmail Test: GmailAlternateThreadlistConversation', |
+ 'gmail-testGmailAlternateTwoLabels': |
+ 'Gmail Test: GmailAlternateTwoLabels', |
+ 'gmail-testGmailExpandCollapseConversation': |
+ 'Gmail Test: GmailExpandCollapseConversation', |
+ 'gmail_wpr-testGmailComposeDiscard': |
+ 'Gmail WPR Test: GmailComposeDiscard', |
+ 'gmail_wpr-testGmailAlternateThreadlistConversation': |
+ 'Gmail WPR Test: GmailAlternateThreadlistConversation', |
+ 'gmail_wpr-testGmailAlternateTwoLabels': |
+ 'Gmail WPR Test: GmailAlternateTwoLabels', |
+ 'gmail_wpr-testGmailExpandCollapseConversation': |
+ 'Gmail WPR Test: GmailExpandCollapseConversation', |
'gpu_frame_rate': 'GPU Frame Rate', |
'gpu_latency': 'GPU Latency', |
'gpu_throughput': 'GPU Throughput', |
'idb_perf': 'Other IndexedDB', |
'image_decoding_benchmark': 'Image Decoding Benchmark', |
'indexeddb': 'Page Cycler IndexedDB', |
+ 'indexeddb-testOfflineOnline': |
+ 'IndexedDB Test: OfflineOnline', |
'intl1': 'Page Cycler Intl1', |
'intl2': 'Page Cycler Intl2', |
'jsgamebench': 'JSGameBench', |
@@ -157,6 +189,10 @@ TestTitles = { |
'new-tab-ui-warm': 'New Tab Warm', |
'octane': 'Octane', |
'page_cycler_2012Q2-netsim': 'Page Cycler 2012Q2 Netsim', |
+ 'plus-testPlusAlternatelyClickStreams': |
+ 'Plus Test: PlusAlternatelyClickStreams', |
+ 'plus_wpr-testPlusAlternatelyClickStreams': |
+ 'Plus WPR Test: PlusAlternatelyClickStreams', |
'pnacl-tools': 'PNaCl Toolchain', |
'pyauto_perf': 'Pyauto Perf', |
'resource_sizes': 'Resource Sizes', |
@@ -206,6 +242,14 @@ var ChromeConfig = { |
}; |
""" |
+# Template contents of a config.js file for endure tests. |
+ENDURE_CONFIG_TEMPLATE = """\ |
+var Config = { |
+ buildslave: '%(system_title)s', |
+ title: '%(title)s', |
+}; |
+""" |
+ |
DEFAULT_SYMLINK_LIST = [ |
('details.html', '../../dashboard/ui/details.html'), |
('report.html', '../../dashboard/ui/generic_plotter.html'), |
@@ -217,6 +261,11 @@ CHROME_DEFAULT_SYMLINK_LIST = [ |
('js', '../../dashboard/ui/js'), |
] |
+ENDURE_DEFAULT_SYMLINK_LIST = [ |
+ ('report.html', '../../dashboard/ui/endure_plotter.html'), |
+ ('js', '../../dashboard/ui/endure_js'), |
+] |
+ |
# Descriptions for optional detail tabs |
DETAIL_TAB_DESC = { |
'view-pages': 'Data', |
@@ -224,6 +273,31 @@ DETAIL_TAB_DESC = { |
} |
+def WriteJSConfigFile(perf_dir, system_title, test_title, symlink_list): |
+ contents = CONFIG_TEMPLATE % { |
+ 'base_url': BASE_URL, |
+ 'system_title': system_title, |
+ 'title': test_title, |
+ 'system_dir': os.path.basename(os.path.dirname(perf_dir)), |
+ } |
+ |
+ # Add detail tabs to config. |
+ if os.path.basename(perf_dir) in ('coverage'): |
+ detail_tabs = ['view-coverage'] |
+ elif os.path.basename(perf_dir) in ('sizes', 'targets'): |
+ detail_tabs = [] |
+ else: |
+ detail_tabs = ['view-pages'] |
+ contents += " detailTabs: { 'view-change': 'CL'" |
+ for tab in detail_tabs: |
+ contents += ", '%s': '%s'" % (tab, DETAIL_TAB_DESC.get(tab, tab)) |
+ contents += ' }\n' |
+ contents += CONFIG_TEMPLATE_END |
+ |
+ with open(os.path.join(perf_dir, 'config.js'), 'w') as config_f: |
+ config_f.write(contents) |
+ |
+ |
def WriteChromeJSConfigFile(): |
"""Write Chrome JavaScript configuration file.""" |
system_title = '' |
@@ -242,10 +316,21 @@ def WriteChromeJSConfigFile(): |
'system_title': system_title, |
'test_title': test_title, |
} |
- open(os.path.join('dashboard', 'chrome_config.js'), 'w').write(contents) |
+ with open(os.path.join('dashboard', 'chrome_config.js'), 'w') as config_f: |
+ config_f.write(contents) |
+ |
+ |
+def WriteEndureJSConfigFile(perf_dir, system_title, test_title, symlink_list): |
+ contents = ENDURE_CONFIG_TEMPLATE % { |
+ 'system_title': system_title, |
+ 'title': test_title, |
+ } |
+ |
+ with open(os.path.join(perf_dir, 'config.js'), 'w') as config_f: |
+ config_f.write(contents) |
-def TestInit(perf_dir, system_title, test_title, symlink_list): |
+def TestInit(perf_dir, system_title, test_title, symlink_list, endure=False): |
for slink, target in symlink_list: |
slink = os.path.join(perf_dir, slink) |
# Remove the old symlinks first. Catch exceptions on the |
@@ -263,27 +348,10 @@ def TestInit(perf_dir, system_title, test_title, symlink_list): |
RemovePath(slink) |
os.symlink(target, slink) |
- contents = CONFIG_TEMPLATE % { |
- 'base_url': BASE_URL, |
- 'system_title': system_title, |
- 'title': test_title, |
- 'system_dir': os.path.basename(os.path.dirname(perf_dir)), |
- } |
- |
- # Add detail tabs to config |
- if os.path.basename(perf_dir) in ('coverage'): |
- detail_tabs = ['view-coverage'] |
- elif os.path.basename(perf_dir) in ('sizes', 'targets'): |
- detail_tabs = [] |
+ if endure: |
+ WriteEndureJSConfigFile(perf_dir, system_title, test_title, symlink_list) |
else: |
- detail_tabs = ['view-pages'] |
- contents += " detailTabs: { 'view-change': 'CL'" |
- for tab in detail_tabs: |
- contents += ", '%s': '%s'" % (tab, DETAIL_TAB_DESC.get(tab, tab)) |
- contents += ' }\n' |
- contents += CONFIG_TEMPLATE_END |
- |
- open(os.path.join(perf_dir, 'config.js'), 'w').write(contents) |
+ WriteJSConfigFile(perf_dir, system_title, test_title, symlink_list) |
def RemovePath(path): |
@@ -302,6 +370,9 @@ def main(): |
parser.add_option( |
'-C', '--chrome', action='store_true', |
help='Initializes perf directories for Chrome.') |
+ parser.add_option( |
+ '-E', '--endure', action='store_true', |
+ help='Initializes perf directories for endure tests.') |
(options, args) = parser.parse_args() |
# Find the script's directory and cd there. |
@@ -312,6 +383,9 @@ def main(): |
system_titles = ChromeSystemTitles |
symlink_list = CHROME_DEFAULT_SYMLINK_LIST |
WriteChromeJSConfigFile() |
+ elif options.endure: |
+ system_titles = EndureSystemTitles |
+ symlink_list = ENDURE_DEFAULT_SYMLINK_LIST |
else: |
system_titles = SystemTitles |
symlink_list = DEFAULT_SYMLINK_LIST |
@@ -332,7 +406,7 @@ def main(): |
test_title = TestTitles[test_dir] |
perf_dir = os.path.join(system_dir, test_dir) |
os.chmod(perf_dir, 0755) |
- TestInit(perf_dir, system_title, test_title, symlink_list) |
+ TestInit(perf_dir, system_title, test_title, symlink_list, options.endure) |
return 0 |