Change search success criterium 73/73473/1
authorLuc Provoost <luc.provoost@gmail.com>
Wed, 14 Sep 2022 15:13:32 +0000 (15:13 +0000)
committerLuc Provoost <luc.provoost@gmail.com>
Wed, 14 Sep 2022 15:26:07 +0000 (15:26 +0000)
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 <luc.provoost@gmail.com>
Change-Id: Id3e787b3571bdb9f241763fceaffccb9ea81a264

VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py
VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py

index 500be5b..ea42fc9 100644 (file)
@@ -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
index 445aed4..46e69f9 100644 (file)
@@ -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