diff options
author | 2016-03-10 17:29:23 +0200 | |
---|---|---|
committer | 2016-03-10 17:29:23 +0200 | |
commit | 9d739f26ec83d5e1dd4125dde5bcb07ec74374c4 (patch) | |
tree | 041101c7441b26b1ad29a5d6408d18ab0fc775bd /scripts/automation/trex_control_plane/stl/trex_stl_lib | |
parent | 6229c603d93f3622984960d51d2175473ba5a25d (diff) |
a minor fix
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib')
-rw-r--r-- | scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_stats.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_stats.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_stats.py index 8d083b89..bb877586 100644 --- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_stats.py +++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_stats.py @@ -895,7 +895,10 @@ class CRxStats(CTRexStats): pg_current['rx_pps'] = self.calc_pps(prev_rx_pps, now_rx_pkts, prev_rx_pkts, diff_sec) pg_current['rx_bps'] = self.calc_bps(prev_rx_bps, now_rx_bytes, prev_rx_bytes, diff_sec) - pg_current['tx_bps_L1'] = calc_bps_L1(pg_current['tx_bps'], pg_current['tx_pps']) + if pg_current['tx_bps'] != None and pg_current['tx_pps'] != None: + pg_current['tx_bps_L1'] = calc_bps_L1(pg_current['tx_bps'], pg_current['tx_pps']) + else: + pg_current['tx_bps_L1'] = None def calc_pps (self, prev_bw, now, prev, diff_sec): |