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

Side by Side Diff: systrace/profile_chrome/profiler.py

Issue 2162963002: [polymer] Merge of master into polymer10-migration (Closed) Base URL: git@github.com:catapult-project/catapult.git@polymer10-migration
Patch Set: Merge polymer10-migration int polymer10-merge Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import os 5 import os
6 6
7 from devil.android.constants import chrome 7 from devil.android.constants import chrome
8 8
9 from profile_chrome import trace_packager 9 from profile_chrome import trace_packager
10 from profile_chrome import ui 10 from profile_chrome import ui
(...skipping 28 matching lines...) Expand all
39 def GetSupportedBrowsers(): 39 def GetSupportedBrowsers():
40 """Returns the package names of all supported browsers.""" 40 """Returns the package names of all supported browsers."""
41 # Add aliases for backwards compatibility. 41 # Add aliases for backwards compatibility.
42 supported_browsers = { 42 supported_browsers = {
43 'stable': chrome.PACKAGE_INFO['chrome_stable'], 43 'stable': chrome.PACKAGE_INFO['chrome_stable'],
44 'beta': chrome.PACKAGE_INFO['chrome_beta'], 44 'beta': chrome.PACKAGE_INFO['chrome_beta'],
45 'dev': chrome.PACKAGE_INFO['chrome_dev'], 45 'dev': chrome.PACKAGE_INFO['chrome_dev'],
46 'build': chrome.PACKAGE_INFO['chrome'], 46 'build': chrome.PACKAGE_INFO['chrome'],
47 } 47 }
48 supported_browsers.update(chrome.PACKAGE_INFO) 48 supported_browsers.update(chrome.PACKAGE_INFO)
49 unsupported_browsers = ['content_browsertests', 'gtest', 'legacy_browser']
50 for browser in unsupported_browsers:
51 if browser in supported_browsers:
52 del supported_browsers[browser]
53 return supported_browsers 49 return supported_browsers
54 50
55 51
56 def CaptureProfile(controllers, interval, output=None, compress=False, 52 def CaptureProfile(controllers, interval, output=None, compress=False,
57 write_json=False): 53 write_json=False):
58 """Records a profiling trace saves the result to a file. 54 """Records a profiling trace saves the result to a file.
59 55
60 Args: 56 Args:
61 controllers: List of tracing controllers. 57 controllers: List of tracing controllers.
62 interval: Time interval to capture in seconds. An interval of None (or 0) 58 interval: Time interval to capture in seconds. An interval of None (or 0)
(...skipping 16 matching lines...) Expand all
79 else: 75 else:
80 ui.PrintMessage('Capturing %s. Press Enter to stop...' % \ 76 ui.PrintMessage('Capturing %s. Press Enter to stop...' % \
81 trace_type, eol='') 77 trace_type, eol='')
82 raw_input() 78 raw_input()
83 finally: 79 finally:
84 _StopTracing(controllers) 80 _StopTracing(controllers)
85 if interval: 81 if interval:
86 ui.PrintMessage('done') 82 ui.PrintMessage('done')
87 83
88 return _PullTraces(controllers, output, compress, write_json) 84 return _PullTraces(controllers, output, compress, write_json)
OLDNEW
« no previous file with comments | « perf_insights/perf_insights/mappers/v8_map_function.html ('k') | systrace/systrace/tracing_agents/atrace_agent.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698