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

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

Issue 1925803003: sandwich: Make speed-index and memory measurement optional from run-all (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | tools/android/loading/sandwich_metrics.py » ('j') | tools/android/loading/sandwich_metrics.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/android/loading/sandwich.py
diff --git a/tools/android/loading/sandwich.py b/tools/android/loading/sandwich.py
index 6dda5d06a2e18c3d852fad57a43f7aac72234f2a..fbf988650c416084fed302f382cbb71f855c73d4 100755
--- a/tools/android/loading/sandwich.py
+++ b/tools/android/loading/sandwich.py
@@ -44,6 +44,9 @@ from trace_test.webserver_test import WebServer
# Use options layer to access constants.
OPTIONS = options.OPTIONS
+_SPEED_INDEX_MEASUREMENT = 'speed-index'
+_MEMORY_MEASUREMENT = 'memory'
+
def _ArgumentParser():
"""Build a command line argument's parser."""
@@ -179,6 +182,9 @@ def _ArgumentParser():
parents=[common_job_parser, task_parser],
help='Run all steps using the task manager '
'infrastructure.')
+ run_all.add_argument('-m', '--measure', default=[], dest='optional_measures',
+ choices=[_SPEED_INDEX_MEASUREMENT, _MEMORY_MEASUREMENT],
+ nargs='+', help='Enable optional measure.')
pasko 2016/04/28 15:04:59 Enable optional measurements.
gabadie 2016/04/28 15:56:22 Done.
run_all.add_argument('-g', '--gen-full', action='store_true',
help='Generate the full graph with all possible'
'benchmarks.')
@@ -281,16 +287,20 @@ def _RunAllMain(args):
builder = sandwich_task_builder.SandwichTaskBuilder(
output_directory=args.output,
android_device=android_device,
- job_path=args.job,
- url_repeat=args.url_repeat)
+ job_path=args.job)
if args.wpr_archive_path:
builder.OverridePathToWprArchive(args.wpr_archive_path)
else:
builder.PopulateWprRecordingTask()
builder.PopulateCommonPipelines()
+ def BenchmarkRunnerTransformer(runner):
+ runner.record_video = _SPEED_INDEX_MEASUREMENT in args.optional_measures
+ runner.record_memory_dumps = _MEMORY_MEASUREMENT in args.optional_measures
+ runner.job_repeat = args.url_repeat
gabadie 2016/04/28 14:29:32 Passing down these benchmark specific parameters u
+
runner_transformer_name = 'no-network-emulation'
- runner_transformer = lambda arg: None
+ runner_transformer = BenchmarkRunnerTransformer
builder.PopulateLoadBenchmark(sandwich_misc.EMPTY_CACHE_DISCOVERER,
runner_transformer_name, runner_transformer)
builder.PopulateLoadBenchmark(sandwich_misc.FULL_CACHE_DISCOVERER,
@@ -303,7 +313,7 @@ def _RunAllMain(args):
for network_condition in ['Regular4G', 'Regular3G', 'Regular2G']:
runner_transformer_name = network_condition.lower()
runner_transformer = sandwich_task_builder.NetworkSimulationTransformer(
- network_condition)
+ network_condition, parent_transformer=BenchmarkRunnerTransformer)
builder.PopulateLoadBenchmark(
subresource_discoverer, runner_transformer_name, runner_transformer)
« no previous file with comments | « no previous file | tools/android/loading/sandwich_metrics.py » ('j') | tools/android/loading/sandwich_metrics.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698