Chromium Code Reviews| 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..b042ae4ba3fc2c5add62313d9a959d76b399bc44 100644 |
| --- a/tools/android/loading/sandwich_task_builder.py |
| +++ b/tools/android/loading/sandwich_task_builder.py |
| @@ -37,7 +37,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 +45,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 |
| @@ -159,16 +156,16 @@ class SandwichTaskBuilder(task_manager.Builder): |
| return ValidateReferenceCache |
| def PopulateLoadBenchmark(self, subresource_discoverer, |
| - runner_transformer_name, runner_transformer): |
| + runner_transformer_name, runner_transformers): |
| """Populate benchmarking tasks from its setup tasks. |
| Args: |
| subresource_discoverer: Name of a subresources discoverer. |
| - runner_transformer: A function that takes an instance of SandwichRunner as |
| - parameter, would be applied immediately before SandwichRunner.Run(). |
| runner_transformer_name: Name of the runner transformer used to generate |
|
pasko
2016/04/28 16:07:50
nit: transformer_names: A string describing the tr
gabadie
2016/04/28 16:24:01
Done.
|
| task names. |
| - benchmark_name: The benchmark's name for that runner modifier. |
| + runner_transformers: An ordered list of function that takes an instance of |
| + SandwichRunner as parameter, would be applied immediately before |
| + SandwichRunner.Run() in the given order. |
| Here is the full dependency of the added tree for the returned task: |
| <runner_transformer_name>/<subresource_discoverer>-metrics.csv |
| @@ -221,9 +218,8 @@ 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) |
| + for runner_transformer in runner_transformers: |
| + runner_transformer(runner) |
| runner.wpr_archive_path = self._patched_wpr_task.path |
| runner.wpr_out_log_path = os.path.join(RunBenchmark.path, 'wpr.log') |
| runner.cache_archive_path = BuildBenchmarkCacheArchive.path |