diff --git a/scenarios/networking/dense_l2.yaml b/scenarios/networking/dense_l2.yaml index 8bcdb0a..5a95f36 100644 --- a/scenarios/networking/dense_l2.yaml +++ b/scenarios/networking/dense_l2.yaml @@ -8,7 +8,7 @@ deployment: accommodation: [pair, double_room, density: 8, compute_nodes: 1] execution: - size: linear_progression + progression: linear tests: - title: Iperf TCP diff --git a/scenarios/networking/dense_l3_east_west.yaml b/scenarios/networking/dense_l3_east_west.yaml index 1918a15..1958108 100644 --- a/scenarios/networking/dense_l3_east_west.yaml +++ b/scenarios/networking/dense_l3_east_west.yaml @@ -7,7 +7,7 @@ deployment: accommodation: [pair, double_room, density: 8, compute_nodes: 1] execution: - size: linear_progression + progression: linear tests: - title: Iperf TCP diff --git a/scenarios/networking/dense_l3_north_south.yaml b/scenarios/networking/dense_l3_north_south.yaml index 7e75097..7ee6651 100644 --- a/scenarios/networking/dense_l3_north_south.yaml +++ b/scenarios/networking/dense_l3_north_south.yaml @@ -8,7 +8,7 @@ deployment: accommodation: [pair, double_room, density: 8, compute_nodes: 1] execution: - size: linear_progression + progression: linear tests: - title: Iperf TCP diff --git a/scenarios/networking/full_l2.yaml b/scenarios/networking/full_l2.yaml index 37cb265..e48ec2b 100644 --- a/scenarios/networking/full_l2.yaml +++ b/scenarios/networking/full_l2.yaml @@ -7,7 +7,7 @@ deployment: accommodation: [pair, single_room] execution: - size: quadratic_progression + progression: quadratic tests: - title: Iperf TCP diff --git a/scenarios/networking/full_l3_east_west.yaml b/scenarios/networking/full_l3_east_west.yaml index 3bc4f96..47dea54 100644 --- a/scenarios/networking/full_l3_east_west.yaml +++ b/scenarios/networking/full_l3_east_west.yaml @@ -7,7 +7,7 @@ deployment: accommodation: [pair, single_room] execution: - size: quadratic_progression + progression: quadratic tests: - title: Iperf TCP diff --git a/scenarios/networking/full_l3_north_south.yaml b/scenarios/networking/full_l3_north_south.yaml index 6e8dd07..8900cab 100644 --- a/scenarios/networking/full_l3_north_south.yaml +++ b/scenarios/networking/full_l3_north_south.yaml @@ -8,7 +8,7 @@ deployment: accommodation: [pair, single_room] execution: - size: quadratic_progression + progression: quadratic tests: - title: Iperf TCP diff --git a/shaker/engine/server.py b/shaker/engine/server.py index 964c89e..657008c 100644 --- a/shaker/engine/server.py +++ b/shaker/engine/server.py @@ -49,16 +49,16 @@ def _make_test_title(test): return re.sub(r'[^\x21-\x7e\x80-\xff]+', '_', s).lower() -def _pick_agents(agents, size): +def _pick_agents(agents, progression): # slave agents do not execute any tests agents = [a for a in agents.values() if a.get('mode') != 'slave'] - if not size or size == 'full': + if not progression: yield agents - elif size == 'linear_progression': + elif progression in ['arithmetic', 'linear', 'linear_progression']: for i in range(len(agents)): yield agents[:i + 1] - elif size == 'quadratic_progression': + elif progression in ['geometric', 'quadratic', 'quadratic_progression']: n = len(agents) seq = [n] while n > 1: @@ -75,8 +75,9 @@ def execute(quorum, execution, agents): for test in execution['tests']: LOG.debug('Running test %s on all agents', test) test_title = _make_test_title(test) + progression = execution.get('progression', execution.get('size')) - for selected_agents in _pick_agents(agents, execution.get('size')): + for selected_agents in _pick_agents(agents, progression): executors = dict((a['id'], executors_classes.get_executor(test, a)) for a in selected_agents) diff --git a/tests/test_server.py b/tests/test_server.py index a87d245..25d66e6 100644 --- a/tests/test_server.py +++ b/tests/test_server.py @@ -46,7 +46,7 @@ class TestServer(testtools.TestCase): 'id': i, 'mode': 'alone', 'node': 'uno', } picked = [set(a['id'] for a in arr) - for arr in server._pick_agents(agents, 'full')] + for arr in server._pick_agents(agents, None)] self.assertEqual([set(range(10))], picked) def test_pick_agents_full_filter_slaves(self): @@ -59,7 +59,7 @@ class TestServer(testtools.TestCase): 'id': 'slave_%s' % i, 'mode': 'slave', 'node': 'uno', } picked = [set(a['id'] for a in arr) - for arr in server._pick_agents(agents, 'full')] + for arr in server._pick_agents(agents, None)] self.assertEqual([set('master_%s' % i for i in range(10))], picked) @@ -70,7 +70,7 @@ class TestServer(testtools.TestCase): 'id': i, 'mode': 'alone', 'node': 'uno', } picked = [set(a['id'] for a in arr) - for arr in server._pick_agents(agents, 'linear_progression')] + for arr in server._pick_agents(agents, 'linear')] self.assertEqual([set(range(i + 1)) for i in range(0, 10)], picked) @@ -82,7 +82,7 @@ class TestServer(testtools.TestCase): } picked = [set(a['id'] for a in arr) for arr in server._pick_agents(agents, - 'quadratic_progression')] + 'quadratic')] self.assertEqual([set(range(1)), set(range(2)), set(range(5)), set(range(10))], picked)