summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py
diff options
context:
space:
mode:
authorLuc Provoost <luc.provoost@intel.com>2020-09-30 16:57:30 +0200
committerXavier Simonart <xavier.simonart@intel.com>2020-10-19 08:50:26 +0000
commitcd690215adb97aee66d355d9bb64a78a55e1defc (patch)
treedc923a9206051793443270b1d8460ce4f325d037 /VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py
parentf9b0da859a9f2a6556f0437d5cff42a0648dcab2 (diff)
Support dataplane subnet mask & latency histogram
There is a new parameter in the config_file: dataplane_subnet_mask. This parameter is added to the dataplane IP addresses and is needed by the Linux stack to deal with some protocols (e.g. ARP). If not present, the default value of 24 will be used. In the end, this will make sure that IP addresses in the rapid.env file will have this mask, e.g. /24 If you use other tools than createrapid.py to create the rapid.env file, make sure to add the mask. This commit also introduces a change when exiting: we only copy the prox.log files from the different prox instances in case we expect a new prox.log file to be created in these instances. When using a valid format.yaml file, the tool will now also send the latency distribution data (histogram) to the URL. The tool is now also checking the value of bucket_size_exp: it needs to be 11 or more. Change-Id: I633cdc64ef687fdb6625be1e7482a5a371f83e93 Signed-off-by: Luc Provoost <luc.provoost@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py')
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py
index cdacb801..2babd340 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py
@@ -285,8 +285,9 @@ class RapidTest(object):
if sample_count > lat_samples * LAT_PERCENTILE:
break
percentile_max = (sample_percentile == len(buckets))
- sample_percentile = sample_percentile * float(2 ** BUCKET_SIZE_EXP) / (old_div(float(lat_hz),float(10**6)))
- buckets_total = [buckets_total[i] + buckets[i] for i in range(len(buckets_total))]
+ bucket_size = float(2 ** BUCKET_SIZE_EXP) / (old_div(float(lat_hz),float(10**6)))
+ sample_percentile = sample_percentile * bucket_size
+ buckets_total = [buckets_total[i] + buckets[i] for i in range(len(buckets_total))]
t2_lat_tsc = t3_lat_tsc
lat_avail = True
t3_rx, t3_non_dp_rx, t3_tx, t3_non_dp_tx, t3_drop, t3_tx_fail, t3_tsc, tsc_hz = self.gen_machine.core_stats()
@@ -351,7 +352,10 @@ class RapidTest(object):
'MaxLatency': lat_max_sample,
'PacketsSent': delta_dp_tx,
'PacketsReceived': delta_dp_rx,
- 'PacketsLost': tot_dp_drop}
+ 'PacketsLost': tot_dp_drop,
+ 'bucket_size': bucket_size,
+ 'buckets': buckets}
+
self.post_data('rapid_flowsizetest', variables)
end_bg_gen_stats = []
for bg_gen_machine in self.background_machines:
@@ -393,7 +397,7 @@ class RapidTest(object):
if sample_count > lat_samples * LAT_PERCENTILE:
break
percentile_max = (percentile == len(buckets))
- percentile = percentile * float(2 ** BUCKET_SIZE_EXP) / (old_div(float(lat_hz),float(10**6)))
+ percentile = percentile * bucket_size
lat_max = lat_max_sample
lat_avg = lat_avg_sample
delta_rx = t4_rx - t2_rx
@@ -414,12 +418,13 @@ class RapidTest(object):
break ## Not really needed since the while loop will stop when evaluating the value of r
else:
sample_count = 0
+ buckets = buckets_total
for percentile, bucket in enumerate(buckets_total,start=1):
sample_count += bucket
if sample_count > tot_lat_samples * LAT_PERCENTILE:
break
percentile_max = (percentile == len(buckets_total))
- percentile = percentile * float(2 ** BUCKET_SIZE_EXP) / (old_div(float(lat_hz),float(10**6)))
+ percentile = percentile * bucket_size
pps_req_tx = (tot_tx + tot_drop - tot_rx)/tot_core_measurement_duration/1000000.0 # tot_drop is all packets dropped by all tasks. This includes packets dropped at the generator task + packets dropped by the nop task. In steady state, this equals to the number of packets received by this VM
pps_tx = tot_tx/tot_core_measurement_duration/1000000.0 # tot_tx is all generated packets actually accepted by the interface
pps_rx = tot_rx/tot_core_measurement_duration/1000000.0 # tot_rx is all packets received by the nop task = all packets received in the gen VM
@@ -433,4 +438,4 @@ class RapidTest(object):
drop_rate = 100.0*tot_dp_drop/dp_tx
if ((drop_rate < self.test['drop_rate_threshold']) or (tot_dp_drop == self.test['drop_rate_threshold'] ==0) or (tot_dp_drop > self.test['maxz'])):
break
- return(pps_req_tx,pps_tx,pps_sut_tx,pps_rx,lat_avg,percentile,percentile_max,lat_max,dp_tx,dp_rx,tot_dp_drop,(t4_tx_fail - t1_tx_fail),drop_rate,lat_min,used_avg,r,tot_core_measurement_duration,avg_bg_rate)
+ return(pps_req_tx,pps_tx,pps_sut_tx,pps_rx,lat_avg,percentile,percentile_max,lat_max,dp_tx,dp_rx,tot_dp_drop,(t4_tx_fail - t1_tx_fail),drop_rate,lat_min,used_avg,r,tot_core_measurement_duration,avg_bg_rate,bucket_size,buckets)