From 56fe9e512019d90a5647f4a244ffb8b6f6ff9c47 Mon Sep 17 00:00:00 2001 From: Vratko Polak Date: Mon, 30 Jul 2018 17:48:50 +0200 Subject: CSIT-1222: Do two doublings in external MLRsearch Make number of doublings configurable, keep Python default at 1, set Robot default to 2. Also make docstring types unique (pylint was complaining about classes and modules having the same name). Increase MLRsearch version to 0.2.0. Change-Id: Ib846032e79ff52994503c0cfef2f86655502c275 Signed-off-by: Vratko Polak --- resources/libraries/python/TrafficGenerator.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'resources/libraries/python/TrafficGenerator.py') diff --git a/resources/libraries/python/TrafficGenerator.py b/resources/libraries/python/TrafficGenerator.py index 8acf1eb28b..1398072ce1 100644 --- a/resources/libraries/python/TrafficGenerator.py +++ b/resources/libraries/python/TrafficGenerator.py @@ -613,7 +613,7 @@ class OptimizedSearch(object): maximum_transmit_rate, packet_loss_ratio=0.005, final_relative_width=0.005, final_trial_duration=30.0, initial_trial_duration=1.0, number_of_intermediate_phases=2, - timeout=720.0): + timeout=720.0, doublings=1): """Setup initialized TG, perform optimized search, return intervals. :param frame_size: Frame size identifier or value [B]. @@ -633,6 +633,9 @@ class OptimizedSearch(object): to perform before the final phase [1]. :param timeout: The search will fail itself when not finished before this overall time [s]. + :param doublings: How many doublings to do in external search step. + Default 1 is suitable for fairly stable tests, + less stable tests might get better overal duration with 2 or more. :type frame_size: str or int :type traffic_type: str :type minimum_transmit_rate: float @@ -643,6 +646,7 @@ class OptimizedSearch(object): :type initial_trial_duration: float :type number_of_intermediate_phases: int :type timeout: float + :type doublings: int :returns: Structure containing narrowed down NDR and PDR intervals and their measurements. :rtype: NdrPdrResult @@ -657,7 +661,8 @@ class OptimizedSearch(object): measurer=tg_instance, final_trial_duration=final_trial_duration, final_relative_width=final_relative_width, number_of_intermediate_phases=number_of_intermediate_phases, - initial_trial_duration=initial_trial_duration, timeout=timeout) + initial_trial_duration=initial_trial_duration, timeout=timeout, + doublings=doublings) result = algorithm.narrow_down_ndr_and_pdr( minimum_transmit_rate, maximum_transmit_rate, packet_loss_ratio) return result -- cgit 1.2.3-korg