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

Unified Diff: generate_perf.py

Issue 12094074: Support Chrome Endure graphs in perf dashboard. (Closed) Base URL: https://git.chromium.org/git/chromium/tools/perf.git@master
Patch Set: updated Created 7 years, 11 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
« dashboard/ui/endure_js/coordinates.js ('K') | « dashboard/ui/endure_plotter.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: generate_perf.py
diff --git a/generate_perf.py b/generate_perf.py
index 6b3a8e7cc27f5a718f77c63ebc0d761326ea5ff7..76531015d54afa44bc3215793a32659b9b72dbb5 100755
--- a/generate_perf.py
+++ b/generate_perf.py
@@ -110,11 +110,21 @@ 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',
@@ -134,6 +144,14 @@ 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',
'gpu_frame_rate': 'GPU Frame Rate',
'gpu_latency': 'GPU Latency',
'gpu_throughput': 'GPU Throughput',
@@ -206,6 +224,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 +243,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 +255,30 @@ 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
dennis_jeffrey 2013/02/05 02:48:28 nit: add period at end of sentence
Dai Mikurube (NOT FULLTIME) 2013/02/05 06:31:49 Done.
+ 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
+
+ open(os.path.join(perf_dir, 'config.js'), 'w').write(contents)
dennis_jeffrey 2013/02/05 02:48:28 should we use the with/open syntax here to ensure
Dai Mikurube (NOT FULLTIME) 2013/02/05 06:31:49 Done. (I'm not sure why the existing code does it
+
+
def WriteChromeJSConfigFile():
"""Write Chrome JavaScript configuration file."""
system_title = ''
@@ -245,7 +300,16 @@ def WriteChromeJSConfigFile():
open(os.path.join('dashboard', 'chrome_config.js'), 'w').write(contents)
-def TestInit(perf_dir, system_title, test_title, symlink_list):
+def WriteEndureJSConfigFile(perf_dir, system_title, test_title, symlink_list):
+ contents = ENDURE_CONFIG_TEMPLATE % {
+ 'system_title': system_title,
+ 'title': test_title,
+ }
+
+ open(os.path.join(perf_dir, 'config.js'), 'w').write(contents)
dennis_jeffrey 2013/02/05 02:48:28 should we use the with/open syntax here too?
Dai Mikurube (NOT FULLTIME) 2013/02/05 06:31:49 Done.
+
+
+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 +327,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 +349,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 +362,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
@@ -321,6 +374,7 @@ def main():
# Skip the entry if it's not a directory or should be ignored.
if not os.path.isdir(system_dir) or system_dir not in system_titles:
continue
+ print system_dir
Mike Stip (use stip instead) 2013/01/31 09:39:22 I think this was left in for testing, do you mind
Dai Mikurube (NOT FULLTIME) 2013/02/01 06:14:13 Ugh, thanks for the good catch. removed.
os.chmod(system_dir, 0755)
system_title = system_titles[system_dir]
@@ -329,10 +383,11 @@ def main():
# Skip the entry if it's not in our mapping of test titles.
if test_dir not in TestTitles:
continue
+ print ' ' + test_dir
Mike Stip (use stip instead) 2013/01/31 09:39:22 same
Dai Mikurube (NOT FULLTIME) 2013/02/01 06:14:13 Done.
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
« dashboard/ui/endure_js/coordinates.js ('K') | « dashboard/ui/endure_plotter.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698