diff options
author | Luc Provoost <luc.provoost@intel.com> | 2020-12-16 15:47:49 +0100 |
---|---|---|
committer | Luc Provoost <luc.provoost@intel.com> | 2020-12-28 12:11:29 +0100 |
commit | 9822834527c84e6e2d36b8b6d9aa81d0facd2a8a (patch) | |
tree | 2562c9be8fd2d78d7f8eb3530e4df5802478479e /VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py | |
parent | 63eeeaf4c2b27db28a0c4fb0c5806978b0a5796d (diff) |
Improved PROX cleanup when exiting
Sending now a 'quit' command to PROX, so that the thread running PROX in
an ssh session is now cleaned up correctly.
Also fixed a problem with the logging when running the code more than
once. We only create handlers now, when they do not yet exist.
Updated the rapid version.
Also added some more tests in the testcases.yaml for xtesting.
At the end of a run, the PROX.log files are copied in the results
directory.
The success criterium for a test 'pass_threshold' has been removed from
the test files and is to be controlled by the xtesting testcases.yaml
file.
Change-Id: Ifbbb1c91f32c9176f52025d9ae4c495b432a94c9
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py')
-rw-r--r-- | VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py index c4308b1f..566e7cf7 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py @@ -99,7 +99,7 @@ class FlowSizeTest(RapidTest): def run(self): result_details = {'Details': 'Nothing'} self.gen_machine.start_latency_cores() - TestPassed = True + TestResult = 0 for imix in self.test['imixs']: size = mean(imix) self.gen_machine.set_udp_packet_size(imix) @@ -122,7 +122,6 @@ class FlowSizeTest(RapidTest): self.set_background_flows(self.background_machines, flow_number) endspeed = None speed = self.get_start_speed_and_init(size) - self.record_start_time() while True: attempts += 1 endwarning = False @@ -164,7 +163,7 @@ class FlowSizeTest(RapidTest): if lat_warning or retry_warning: endwarning = '| | {:177.177} |'.format(retry_warning + lat_warning) success = True - TestPassed = False # fixed rate testing cannot be True, it is just reporting numbers every second + TestResult = TestResult + pps_rx # fixed rate testing result is strange: we just report the pps received speed_prefix = lat_avg_prefix = lat_perc_prefix = lat_max_prefix = abs_drop_rate_prefix = drop_rate_prefix = bcolors.ENDC # The following if statement is testing if we pass the success criteria of a certain drop rate, average latency and maximum latency below the threshold # The drop rate success can be achieved in 2 ways: either the drop rate is below a treshold, either we want that no packet has been lost during the test @@ -234,10 +233,7 @@ class FlowSizeTest(RapidTest): break elif self.resolution_achieved(): break - self.record_stop_time() if endspeed is not None: - if TestPassed and (endpps_rx < self.test['pass_threshold']): - TestPassed = False speed_prefix = lat_avg_prefix = lat_perc_prefix = lat_max_prefix = abs_drop_rate_prefix = drop_rate_prefix = bcolors.ENDC RapidLog.info(self.report_result(flow_number,size,endspeed,endpps_req_tx,endpps_tx,endpps_sut_tx,endpps_rx,endlat_avg,endlat_perc,endlat_perc_max,endlat_max,endabs_tx,endabs_rx,endabs_dropped,actual_duration,speed_prefix,lat_avg_prefix,lat_perc_prefix,lat_max_prefix,abs_drop_rate_prefix,drop_rate_prefix)) if endavg_bg_rate: @@ -248,10 +244,9 @@ class FlowSizeTest(RapidTest): RapidLog.info (endwarning) RapidLog.info("+--------+------------------+-------------+-------------+-------------+------------------------+----------+----------+----------+-----------+-----------+-----------+-----------+-------+----+") if self.test['test'] != 'fixed_rate': + TestResult = TestResult + endpps_rx result_details = {'test': self.test['testname'], 'environment_file': self.test['environment_file'], - 'start_date': self.start, - 'stop_date': self.stop, 'Flows': flow_number, 'Size': size, 'RequestedSpeed': RapidTest.get_pps(endspeed,size), @@ -271,4 +266,4 @@ class FlowSizeTest(RapidTest): else: RapidLog.info('|{:>7}'.format(str(flow_number))+" | Speed 0 or close to 0") self.gen_machine.stop_latency_cores() - return (TestPassed, result_details) + return (TestResult, result_details) |