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

Unified Diff: tools/android/loading/sandwich_task_builder.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
Index: tools/android/loading/sandwich_task_builder.py
diff --git a/tools/android/loading/sandwich_task_builder.py b/tools/android/loading/sandwich_task_builder.py
index 954c67ec221a8c300126f9931a4a670fbf96ee8d..b9ea41e181f3aa6d7eb05cf39ccd53b7e20aba97 100644
--- a/tools/android/loading/sandwich_task_builder.py
+++ b/tools/android/loading/sandwich_task_builder.py
@@ -16,12 +16,15 @@ import sandwich_runner
import task_manager
-def NetworkSimulationTransformer(network_condition):
+def NetworkSimulationTransformer(network_condition,
+ parent_transformer=lambda _: None):
pasko 2016/04/28 15:04:59 default arg value is not needed, please remove
gabadie 2016/04/28 15:56:22 Done.
"""Creates a function that accepts a SandwichRunner as a parameter and sets
network emulation options on it.
Args:
network_condition: The network condition to apply to the sandwich runner.
+ parent_transformer: An optional SandwichRunner transformer to use BEFORE
+ the network condition setup.
Returns:
A callback transforming the SandwichRunner given in argument accordingly
@@ -29,6 +32,7 @@ def NetworkSimulationTransformer(network_condition):
assert network_condition in emulation.NETWORK_CONDITIONS
def Transformer(runner):
assert isinstance(runner, sandwich_runner.SandwichRunner)
+ parent_transformer(runner)
runner.network_condition = network_condition
return Transformer
@@ -37,7 +41,7 @@ class SandwichTaskBuilder(task_manager.Builder):
"""A builder for a graph of tasks, each prepares or invokes a SandwichRunner.
"""
- def __init__(self, output_directory, android_device, job_path, url_repeat):
+ def __init__(self, output_directory, android_device, job_path):
"""Constructor.
Args:
@@ -45,13 +49,10 @@ class SandwichTaskBuilder(task_manager.Builder):
android_device: The android DeviceUtils to run sandwich on or None to run
it locally.
job_path: Path of the sandwich's job.
- url_repeat: Non null integer controlling how many times the URLs should be
- repeated in the benchmarks.
"""
task_manager.Builder.__init__(self, output_directory)
self._android_device = android_device
self._job_path = job_path
- self._url_repeat = url_repeat
self._default_final_tasks = []
self._original_wpr_task = None
@@ -221,8 +222,6 @@ class SandwichTaskBuilder(task_manager.Builder):
dependencies=[BuildBenchmarkCacheArchive])
def RunBenchmark():
runner = self._CreateSandwichRunner()
- # runner.record_video = True
- runner.job_repeat = self._url_repeat
runner_transformer(runner)
runner.wpr_archive_path = self._patched_wpr_task.path
runner.wpr_out_log_path = os.path.join(RunBenchmark.path, 'wpr.log')
« tools/android/loading/sandwich_runner.py ('K') | « tools/android/loading/sandwich_runner.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698