Fix for latency reporting and log file handler 90/71390/1
authorLuc Provoost <luc.provoost@intel.com>
Fri, 13 Nov 2020 15:06:46 +0000 (16:06 +0100)
committerLuc Provoost <luc.provoost@intel.com>
Fri, 13 Nov 2020 15:06:46 +0000 (16:06 +0100)
The latency histogram dat did not contain samples collected during the
first measurement of each step. The maximum latency did take the first
step into account. As a result, you  might see a test run with a maximum
latency not showing up in the latency histogram data. This has been
fixed by also including the data from the first measurement in the
histogram data. In some cases, we also reported the wrong speed from the
last unsuccessful step. This is now fixed and we do report the speed
from the last successful step.
In rapid_log.py, a fix was added to execute the rollover on the file
handler of the log file in all cases. In some cases, the file handler
with index 0 was not the file handler of the log file.

Change-Id: I6c2b16c21dd0ee17d1d14e46c4c544e185324256
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py
VNFs/DPPD-PROX/helper-scripts/rapid/rapid_log.py
VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py

index f547b3c..288c78f 100644 (file)
@@ -259,7 +259,7 @@ class FlowSizeTest(RapidTest):
                                 'stop_date': self.stop,
                                 'Flows': flow_number,
                                 'Size': size,
-                                'RequestedSpeed': RapidTest.get_pps(speed,size),
+                                'RequestedSpeed': RapidTest.get_pps(endspeed,size),
                                 'CoreGenerated': endpps_req_tx,
                                 'SentByNIC': endpps_tx,
                                 'FwdBySUT': endpps_sut_tx,
@@ -269,7 +269,7 @@ class FlowSizeTest(RapidTest):
                                 'MaxLatency': endlat_max,
                                 'PacketsSent': endabs_tx,
                                 'PacketsReceived': endabs_rx,
-                                'PacketsLost': abs_dropped,
+                                'PacketsLost': endabs_dropped,
                                 'bucket_size': bucket_size,
                                 'buckets': endbuckets}
                         self.post_data('rapid_flowsizetest', variables)
index 9c79458..d1460f5 100644 (file)
@@ -91,7 +91,7 @@ class RapidLog(object):
             log.debug('\n---------\nLog closed on %s.\n---------\n' % time.asctime())
 
             # Roll over on application start
-            log.handlers[0].doRollover()
+            file_handler.doRollover()
 
         # Add timestamp
         log.debug('\n---------\nLog started on %s.\n---------\n' % time.asctime())
index 2babd34..be7afb3 100644 (file)
@@ -256,8 +256,8 @@ class RapidTest(object):
                 RapidLog.info(self.report_result(flow_number,size,speed,None,None,None,None,lat_avg,sample_percentile,percentile_max,lat_max, dp_tx, dp_rx , None, None))
             tot_rx = tot_non_dp_rx = tot_tx = tot_non_dp_tx = tot_drop = 0
             lat_avg = used_avg = 0
-            buckets_total = [0] * 128
-            tot_lat_samples = 0
+            buckets_total = [buckets[i] for i in range(len(buckets))]
+            tot_lat_samples = sum(buckets)
             tot_lat_measurement_duration = float(0)
             tot_core_measurement_duration = float(0)
             tot_sut_core_measurement_duration = float(0)