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

Unified Diff: tools/android/loading/sandwich_runner.py

Issue 1872313002: sandwich: Implement SandwichTaskBuilder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addresses pasko's comments Created 4 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
Index: tools/android/loading/sandwich_runner.py
diff --git a/tools/android/loading/sandwich_runner.py b/tools/android/loading/sandwich_runner.py
index 39bf4d61050deb64d4892e59b07426a872b68217..0d6d1050bc06c9e7eb0545820fc3a4771a5d223e 100644
--- a/tools/android/loading/sandwich_runner.py
+++ b/tools/android/loading/sandwich_runner.py
@@ -20,9 +20,16 @@ import controller
import devtools_monitor
import device_setup
import loading_trace
-import sandwich_metrics
+# Standard filenames in the sandwich runner's output directory.
+TRACE_FILENAME = 'trace.json'
+VIDEO_FILENAME = 'video.mp4'
+
+# List of selected trace event categories when running chrome.
+ADDITIONAL_CATEGORIES = (
+ 'disabled-by-default-memory-infra',) # Used by _GetBrowserDumpEvents()
+
_JOB_SEARCH_PATH = 'sandwich_jobs'
# Devtools timeout of 1 minute to avoid websocket timeout on slow
@@ -197,24 +204,24 @@ class SandwichRunner(object):
if run_path is not None and self.record_video:
device = self._chrome_ctl.GetDevice()
assert device, 'Can only record video on a remote device.'
- video_recording_path = os.path.join(run_path, 'video.mp4')
+ video_recording_path = os.path.join(run_path, VIDEO_FILENAME)
with device_setup.RemoteSpeedIndexRecorder(device, connection,
video_recording_path):
trace = loading_trace.LoadingTrace.RecordUrlNavigation(
url=url,
connection=connection,
chrome_metadata=self._chrome_ctl.ChromeMetadata(),
- additional_categories=sandwich_metrics.ADDITIONAL_CATEGORIES,
+ additional_categories=ADDITIONAL_CATEGORIES,
timeout_seconds=_DEVTOOLS_TIMEOUT)
else:
trace = loading_trace.LoadingTrace.RecordUrlNavigation(
url=url,
connection=connection,
chrome_metadata=self._chrome_ctl.ChromeMetadata(),
- additional_categories=sandwich_metrics.ADDITIONAL_CATEGORIES,
+ additional_categories=ADDITIONAL_CATEGORIES,
timeout_seconds=_DEVTOOLS_TIMEOUT)
if run_path is not None:
- trace_path = os.path.join(run_path, 'trace.json')
+ trace_path = os.path.join(run_path, TRACE_FILENAME)
trace.ToJsonFile(trace_path)
def _RunUrl(self, url, run_id):

Powered by Google App Engine
This is Rietveld 408576698