aboutsummaryrefslogtreecommitdiffstats
path: root/nfvbench/traffic_gen/dummy.py
diff options
context:
space:
mode:
authorfmenguy <francoisregis.menguy@orange.com>2020-05-06 17:35:35 +0200
committerfmenguy <francoisregis.menguy@orange.com>2020-05-27 11:07:32 +0200
commit143c4ff68068fd704e7eb4df1c82af29f087c871 (patch)
tree969713b19beae3944d5d25beb9a3dae8ed6fcf63 /nfvbench/traffic_gen/dummy.py
parentcaac5c7f6e80d33d5031f26e5e0f0ea6f1d3789b (diff)
[NFVBENCH-168] Improve config properties managed after a REST call
Change-Id: I20973c1c405dec8cce58f984e1fb84e345013b25 Signed-off-by: fmenguy <francoisregis.menguy@orange.com>
Diffstat (limited to 'nfvbench/traffic_gen/dummy.py')
-rw-r--r--nfvbench/traffic_gen/dummy.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/nfvbench/traffic_gen/dummy.py b/nfvbench/traffic_gen/dummy.py
index 7fd3fdb..272990a 100644
--- a/nfvbench/traffic_gen/dummy.py
+++ b/nfvbench/traffic_gen/dummy.py
@@ -147,6 +147,10 @@ class DummyTG(AbstractTrafficGenerator):
total_tx_pps += tx_pps
# actual total tx rate in pps
result['total_tx_rate'] = total_tx_pps
+ # actual offered tx rate in bps
+ avg_packet_size = utils.get_average_packet_size(self.l2_frame_size)
+ total_tx_bps = utils.pps_to_bps(total_tx_pps, avg_packet_size)
+ result['offered_tx_rate_bps'] = total_tx_bps
return result
def get_stream_stats(self, tg_stats, if_stats, latencies, chain_idx):