From 4db0297e72a5844fd124f7ee65db874812f50564 Mon Sep 17 00:00:00 2001 From: Daniel Mitterdorfer Date: Tue, 28 Aug 2018 14:39:23 +0200 Subject: [PATCH] Avoid throughput throttling in test mode Test mode is intended to finish quickly and we only run a small number of requests per task anyway. Therefore we remove any specified target througput or target interval from all tasks. --- esrally/track/loader.py | 5 +++++ tests/track/loader_test.py | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/esrally/track/loader.py b/esrally/track/loader.py index fbe3a076a..9ad01ae00 100644 --- a/esrally/track/loader.py +++ b/esrally/track/loader.py @@ -586,6 +586,11 @@ def post_process_for_test_mode(t): if leaf_task.time_period is not None and leaf_task.time_period > 10: leaf_task.time_period = 10 logger.info("Resetting measurement time period for [%s] to [%d] seconds.", str(leaf_task), leaf_task.time_period) + + logger.info("Avoiding throughput throttling") + leaf_task.params.pop("target-throughput", None) + leaf_task.params.pop("target-interval", None) + return t diff --git a/tests/track/loader_test.py b/tests/track/loader_test.py index 09e29262f..f08bd2865 100644 --- a/tests/track/loader_test.py +++ b/tests/track/loader_test.py @@ -840,14 +840,16 @@ def test_post_processes_track_spec(self): "clients": 4, "operation": "search", "warmup-iterations": 1000, - "iterations": 2000 + "iterations": 2000, + "target-interval": 30 }, { "name": "search #2", "clients": 1, "operation": "search", "warmup-iterations": 1000, - "iterations": 2000 + "iterations": 2000, + "target-throughput": 200 }, { "name": "search #3",