From e7dbec331e68ca083ba079a66c1b93dd311248d6 Mon Sep 17 00:00:00 2001 From: Luc Provoost Date: Wed, 14 Sep 2022 15:13:32 +0000 Subject: Change search success criterium When running a step in the binary search, we can now change the behaviour by adding a new parameter in the [test] section of the test file: generator_threshold. The default value for this parameter is set to inf, which results in the same behaviour as before this change was implemented. The relative difference between what the cores can generate and what is actually sent into the generator's interface must be lower than the generator_threshold, for the test to be successful. Signed-off-by: Luc Provoost Change-Id: Id3e787b3571bdb9f241763fceaffccb9ea81a264 --- VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py | 9 ++++++++- VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py | 7 ++++--- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'VNFs') diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py index 500be5b4..ea42fc9a 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py @@ -226,7 +226,14 @@ class FlowSizeTest(RapidTest): # the drop rate is below a treshold, either we want that no # packet has been lost during the test. # This can be specified by putting 0 in the .test file - elif ((iteration_data['drop_rate'] < self.test['drop_rate_threshold']) or (iteration_data['abs_dropped']==self.test['drop_rate_threshold']==0)) and (iteration_data['lat_avg']< self.test['lat_avg_threshold']) and (iteration_data['lat_perc']< self.test['lat_perc_threshold']) and (iteration_data['lat_max'] < self.test['lat_max_threshold'] and iteration_data['mis_ordered'] <= self.test['mis_ordered_threshold']): + elif ((self.get_pps(speed,size) - iteration_data['pps_tx']) / self.get_pps(speed,size)) \ + < self.test['generator_threshold'] and \ + ((iteration_data['drop_rate'] < self.test['drop_rate_threshold']) or \ + (iteration_data['abs_dropped']==self.test['drop_rate_threshold']==0)) and \ + (iteration_data['lat_avg']< self.test['lat_avg_threshold']) and \ + (iteration_data['lat_perc']< self.test['lat_perc_threshold']) and \ + (iteration_data['lat_max'] < self.test['lat_max_threshold'] and \ + iteration_data['mis_ordered'] <= self.test['mis_ordered_threshold']): end_data = copy.deepcopy(iteration_data) end_prefix = copy.deepcopy(iteration_prefix) success = True diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py index 445aed4b..46e69f95 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py @@ -91,7 +91,7 @@ class RapidConfigParser(object): 'flowsize','warmupflowsize','warmuptime', 'steps']: test[option] = int(testconfig.get(section, option)) elif option in ['startspeed', 'step', 'drop_rate_threshold', - 'lat_avg_threshold','lat_perc_threshold', + 'generator_threshold','lat_avg_threshold','lat_perc_threshold', 'lat_max_threshold','accuracy','maxr','maxz', 'ramp_step','warmupspeed','mis_ordered_threshold']: test[option] = float(testconfig.get(section, option)) @@ -102,8 +102,9 @@ class RapidConfigParser(object): if test['test'] in ['flowsizetest','TST009test']: if 'drop_rate_threshold' not in test.keys(): test['drop_rate_threshold'] = 0 - latency_thresholds = ['lat_avg_threshold','lat_perc_threshold','lat_max_threshold','mis_ordered_threshold'] - for threshold in latency_thresholds: + thresholds = ['generator_threshold','lat_avg_threshold', \ + 'lat_perc_threshold','lat_max_threshold','mis_ordered_threshold'] + for threshold in thresholds: if threshold not in test.keys(): test[threshold] = inf test_params['tests'] = tests -- cgit 1.2.3-korg