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

Unified Diff: tools/telemetry/telemetry/core/platform/profiler/android_systrace_profiler.py

Issue 902763002: Parallelize telemetry unit tests on Android bots (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove fyi bot config (will create another CL for it) Created 5 years, 10 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
Index: tools/telemetry/telemetry/core/platform/profiler/android_systrace_profiler.py
diff --git a/tools/telemetry/telemetry/core/platform/profiler/android_systrace_profiler.py b/tools/telemetry/telemetry/core/platform/profiler/android_systrace_profiler.py
index 3245014eecbe38fd2d0d82994113ad9e8c42c085..81a3ffe3d90bb09f1ca5523adcf17a99c7c6cc89 100644
--- a/tools/telemetry/telemetry/core/platform/profiler/android_systrace_profiler.py
+++ b/tools/telemetry/telemetry/core/platform/profiler/android_systrace_profiler.py
@@ -24,7 +24,8 @@ _SYSTRACE_CATEGORIES = [
class AndroidSystraceProfiler(profiler.Profiler):
"""Collects a Systrace on Android."""
- def __init__(self, browser_backend, platform_backend, output_path, state):
+ def __init__(self, browser_backend, platform_backend, output_path, state,
+ device=None):
super(AndroidSystraceProfiler, self).__init__(
browser_backend, platform_backend, output_path, state)
assert self._browser_backend.supports_tracing
@@ -37,13 +38,15 @@ class AndroidSystraceProfiler(profiler.Profiler):
options = tracing_options.TracingOptions()
options.enable_chrome_trace = True
self._browser_backend.StartTracing(options, timeout=10)
- self._profiler = subprocess.Popen(
- ['python', os.path.join(util.GetChromiumSrcDir(), 'tools',
- 'profile_chrome.py'),
- '--categories', '', '--continuous', '--output',
- self._systrace_output_path, '--json', '--systrace',
- ','.join(_SYSTRACE_CATEGORIES)],
- stdin=subprocess.PIPE, stdout=subprocess.PIPE)
+ command = ['python', os.path.join(util.GetChromiumSrcDir(), 'tools',
+ 'profile_chrome.py'),
+ '--categories', '', '--continuous', '--output',
+ self._systrace_output_path, '--json', '--systrace',
+ ','.join(_SYSTRACE_CATEGORIES)]
+ if device:
+ command.extend(['--device', device])
+ self._profiler = subprocess.Popen(command, stdin=subprocess.PIPE,
+ stdout=subprocess.PIPE)
@classmethod
def name(cls):

Powered by Google App Engine
This is Rietveld 408576698