summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Provoost <luc.provoost@intel.com>2020-11-13 16:06:46 +0100
committerLuc Provoost <luc.provoost@intel.com>2020-11-13 16:06:46 +0100
commit5de20bff8792a736dabf5e48be8e14154ab4f7cc (patch)
tree6797f9e3e8a2fa2a3f41e53514cce93882b8fec9
parentce5b1f80d8ca7e29694f6540801ea9853fb7ddb6 (diff)
Fix for latency reporting and log file handler
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>
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py4
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/rapid_log.py2
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py4
3 files changed, 5 insertions, 5 deletions
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py
index f547b3c..288c78f 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py
@@ -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)
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_log.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_log.py
index 9c79458..d1460f5 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_log.py
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_log.py
@@ -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())
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py
index 2babd34..be7afb3 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py
@@ -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)