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

Unified Diff: tools/android/loading/sandwich_metrics.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_metrics.py
diff --git a/tools/android/loading/sandwich_metrics.py b/tools/android/loading/sandwich_metrics.py
index 1a9e96d6929bcbd7526bb889ceb2175600ff6e7f..61b5815c6f02fd0e15d6bbb8a1430ff0d7227af8 100644
--- a/tools/android/loading/sandwich_metrics.py
+++ b/tools/android/loading/sandwich_metrics.py
@@ -26,20 +26,10 @@ from telemetry.util import image_util
from telemetry.util import rgba_color
import loading_trace as loading_trace_module
+import sandwich_runner
import tracing
-# List of selected trace event categories when running chrome.
-CATEGORIES = [
- # Need blink network trace events for prefetch_view.PrefetchSimulationView
- 'blink.net',
-
- # Need to get mark trace events for _GetWebPageTrackedEvents()
- 'blink.user_timing',
-
- # Need to memory dump trace event for _GetBrowserDumpEvents()
- 'disabled-by-default-memory-infra']
-
CSV_FIELD_NAMES = [
'id',
'url',
@@ -247,7 +237,7 @@ def PullMetricsFromOutputDirectory(output_directory_path):
except ValueError:
continue
run_path = os.path.join(output_directory_path, node_name)
- trace_path = os.path.join(run_path, 'trace.json')
+ trace_path = os.path.join(run_path, sandwich_runner.TRACE_FILENAME)
if not os.path.isfile(trace_path):
continue
logging.info('processing \'%s\'' % trace_path)
@@ -256,7 +246,7 @@ def PullMetricsFromOutputDirectory(output_directory_path):
row_metrics.update(_PullMetricsFromLoadingTrace(loading_trace))
row_metrics['id'] = page_id
row_metrics['url'] = loading_trace.url
- video_path = os.path.join(run_path, 'video.mp4')
+ video_path = os.path.join(run_path, sandwich_runner.VIDEO_FILENAME)
if os.path.isfile(video_path):
logging.info('processing \'%s\'' % video_path)
completeness_record = _ExtractCompletenessRecordFromVideo(video_path)

Powered by Google App Engine
This is Rietveld 408576698