diff options
author | Xavier Simonart <simonartxavier@gmail.com> | 2022-01-09 19:30:10 +0000 |
---|---|---|
committer | Xavier Simonart <simonartxavier@gmail.com> | 2022-02-06 21:41:35 +0000 |
commit | 00f643ee70f45b3a361b578d90d393137b00fd0a (patch) | |
tree | 9a0998565e13c1ef633d5a3b30e72e50ee42d303 | |
parent | 293ee4b62ca9b9d2d68492831b060c8af684ff8e (diff) |
Added support for mis-ordered packets in rapid
- mis-ordered packets are reported/displayed in an extra column
- a treshold can be specified for mis-ordered packets, as a criterium
Signed-off-by: Xavier Simonart <simonartxavier@gmail.com>
Change-Id: I3e17f86c44e54abcec2412ec57ba5303105b7b91
-rw-r--r-- | VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py | 24 | ||||
-rw-r--r-- | VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py | 5 | ||||
-rw-r--r-- | VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py | 7 |
3 files changed, 25 insertions, 11 deletions
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py index 5eca1cb2..e004df87 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py @@ -52,7 +52,7 @@ class FlowSizeTest(RapidTest): self.test['TST009_S'].append((m+1) * self.test['stepsize']) elif self.test['test'] == 'fixed_rate': for key in['drop_rate_threshold','lat_avg_threshold', - 'lat_perc_threshold','lat_max_threshold']: + 'lat_perc_threshold','lat_max_threshold','mis_ordered_threshold']: self.test[key] = inf def new_speed(self, speed,size,success): @@ -109,6 +109,7 @@ class FlowSizeTest(RapidTest): FLOWSIZE = self.test['warmupflowsize'] WARMUPSPEED = self.test['warmupspeed'] WARMUPTIME = self.test['warmuptime'] + RapidLog.info(("Warming up during {} seconds..., packet size = {}," " flows = {}, speed = {}").format(WARMUPTIME, imix, FLOWSIZE, WARMUPSPEED)) @@ -141,24 +142,24 @@ class FlowSizeTest(RapidTest): else: backgroundinfo = '{}{}'.format(bcolors.FLASH,bcolors.ENDC) self.set_background_size(self.background_machines, imix) - RapidLog.info('+' + '-' * 188 + '+') + RapidLog.info('+' + '-' * 200 + '+') RapidLog.info(("| UDP, {:>5} bytes, different number of flows by " - "randomizing SRC & DST UDP port. {:116.116}|"). + "randomizing SRC & DST UDP port. {:128.128}|"). format(round(size), backgroundinfo)) RapidLog.info('+' + '-' * 8 + '+' + '-' * 18 + '+' + '-' * 13 + '+' + '-' * 13 + '+' + '-' * 13 + '+' + '-' * 24 + '+' + '-' * 10 + '+' + '-' * 10 + '+' + '-' * 10 + '+' + '-' * 11 + '+' + '-' * 11 + '+' + '-' * 11 + '+' + '-' * 11 + '+' - + '-' * 7 + '+' + '-' * 4 + '+') + + '-' * 7 + '+' + '-' * 11 + '+' + '-' * 4 + '+') RapidLog.info(('| Flows | Speed requested | Gen by core | Sent by' ' NIC | Fwrd by SUT | Rec. by core | Avg. Lat.|{:.0f}' ' Pcentil| Max. Lat.| Sent | Received | Lost | Total' - ' Lost|L.Ratio|Time|').format(self.test['lat_percentile']*100)) + ' Lost|L.Ratio|Mis-ordered|Time').format(self.test['lat_percentile']*100)) RapidLog.info('+' + '-' * 8 + '+' + '-' * 18 + '+' + '-' * 13 + '+' + '-' * 13 + '+' + '-' * 13 + '+' + '-' * 24 + '+' + '-' * 10 + '+' + '-' * 10 + '+' + '-' * 10 + '+' + '-' * 11 + '+' + '-' * 11 + '+' + '-' * 11 + '+' + '-' * 11 + '+' - + '-' * 7 + '+' + '-' * 4 + '+') + + '-' * 7 + '+' + '-' * 11 + '+' + '-' * 4 + '+') for flow_number in self.test['flows']: attempts = 0 self.gen_machine.reset_stats() @@ -201,6 +202,7 @@ class FlowSizeTest(RapidTest): 'lat_perc' : bcolors.ENDC, 'lat_max' : bcolors.ENDC, 'abs_drop_rate' : bcolors.ENDC, + 'mis_ordered' : bcolors.ENDC, 'drop_rate' : bcolors.ENDC} if self.test['test'] == 'fixed_rate': end_data = copy.deepcopy(iteration_data) @@ -219,7 +221,7 @@ 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']): + 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']): if (old_div((self.get_pps(speed,size) - iteration_data['pps_tx']),self.get_pps(speed,size)))>0.01: iteration_prefix['speed'] = bcolors.WARNING if iteration_data['abs_tx_fail'] > 0: @@ -242,7 +244,7 @@ class FlowSizeTest(RapidTest): success_message=' FAILED' if ((iteration_data['abs_dropped']>0) and (self.test['drop_rate_threshold'] ==0)): iteration_prefix['abs_drop_rate'] = bcolors.FAIL - if (iteration_data['drop_rate'] < self.test['drop_rate_threshold']): + if (iteration_data['drop_rate'] <= self.test['drop_rate_threshold']): iteration_prefix['drop_rate'] = bcolors.ENDC else: iteration_prefix['drop_rate'] = bcolors.FAIL @@ -262,6 +264,11 @@ class FlowSizeTest(RapidTest): iteration_prefix['speed'] = bcolors.ENDC else: iteration_prefix['speed'] = bcolors.FAIL + if (iteration_data['mis_ordered']< self.test['mis_ordered_threshold']): + iteration_prefix['mis_ordered'] = bcolors.ENDC + else: + iteration_prefix['mis_ordered'] = bcolors.FAIL + success = False RapidLog.debug(self.report_result(-attempts, size, iteration_data, iteration_prefix) + @@ -297,5 +304,6 @@ class FlowSizeTest(RapidTest): '+' + '-' * 13 + '+' + '-' * 13 + '+' + '-' * 24 + '+' + '-' * 10 + '+' + '-' * 10 + '+' + '-' * 10 + '+' + '-' * 11 + '+' + '-' * 11 + '+' + '-' * 11 + '+' + '-' * 11 + '+' + + '+' + '-' * 11 + '+' + '-' * 7 + '+' + '-' * 4 + '+') return (TestResult, result_details) diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py index eba71d96..81a1c45a 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py @@ -46,6 +46,7 @@ class RapidConfigParser(object): test_params['lat_percentile'] = 0.99 RapidLog.info('Latency percentile at {:.0f}%'.format( test_params['lat_percentile']*100)) + if testconfig.has_option('TestParameters', 'ipv6'): test_params['ipv6'] = testconfig.getboolean('TestParameters','ipv6') else: @@ -86,7 +87,7 @@ class RapidConfigParser(object): elif option in ['startspeed', 'step', 'drop_rate_threshold', 'lat_avg_threshold','lat_perc_threshold', 'lat_max_threshold','accuracy','maxr','maxz', - 'ramp_step','warmupspeed']: + 'ramp_step','warmupspeed','mis_ordered_threshold']: test[option] = float(testconfig.get(section, option)) else: test[option] = testconfig.get(section, option) @@ -95,7 +96,7 @@ 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'] + latency_thresholds = ['lat_avg_threshold','lat_perc_threshold','lat_max_threshold','mis_ordered_threshold'] for threshold in latency_thresholds: if threshold not in test.keys(): test[threshold] = inf diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py index d100c1ee..76b3bf0b 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py @@ -167,6 +167,10 @@ class RapidTest(object): elapsed_time_str = ' NA |' else: elapsed_time_str = '{:>3.0f} |'.format(data['actual_duration']) + if data['mis_ordered'] is None: + mis_ordered_str = ' NA ' + else: + mis_ordered_str = '{:>9.0f} '.format(data['mis_ordered']) return(flow_number_str + '{:>5.1f}'.format(data['speed']) + '% ' + prefix['speed'] + '{:>6.3f}'.format(RapidTest.get_pps(data['speed'],size)) + ' Mpps|' + pps_req_tx_str + pps_tx_str + bcolors.ENDC + pps_sut_tx_str + @@ -175,7 +179,8 @@ class RapidTest(object): + ' us | ' + '{:>9.0f}'.format(data['abs_tx']) + ' | {:>9.0f}'.format(data['abs_rx']) + ' | '+ prefix['abs_drop_rate']+ '{:>9.0f}'.format(data['abs_tx']-data['abs_rx']) + tot_drop_str + prefix['drop_rate'] + - '{:>5.2f}'.format(100*old_div(float(data['abs_tx']-data['abs_rx']),data['abs_tx'])) + bcolors.ENDC + + '{:>5.2f}'.format(100*old_div(float(data['abs_tx']-data['abs_rx']),data['abs_tx'])) + ' |' + + prefix['mis_ordered'] + mis_ordered_str + bcolors.ENDC + ' |' + elapsed_time_str) def run_iteration(self, requested_duration, flow_number, size, speed): |