diff options
author | Ido Barnea <ibarnea@cisco.com> | 2016-05-29 16:03:26 +0300 |
---|---|---|
committer | Ido Barnea <ibarnea@cisco.com> | 2016-05-29 16:03:26 +0300 |
commit | f2abf803461fb88d59f31398764d946f982b4647 (patch) | |
tree | 27714689a1cc7d91dd5f8097b8576d2089b9b873 | |
parent | dad5f59181ad000c5e43d96037377d9f1ce2d57a (diff) |
Handle latency min when there are no samples
-rw-r--r-- | scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_stats.py | 3 |
1 files changed, 2 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 ee4bd1f9..ae1adc2d 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 @@ -1033,7 +1033,8 @@ class CLatencyStats(CTRexStats): output[int_pg_id]['latency']['total_min'] = 1 output[int_pg_id]['latency']['histogram'][0] = zero_count else: - output[int_pg_id]['latency']['total_min'] = min(output[int_pg_id]['latency']['histogram'].keys()) + if output[int_pg_id]['latency']['histogram'].keys() != []: + output[int_pg_id]['latency']['total_min'] = min(output[int_pg_id]['latency']['histogram'].keys()) self.latest_stats = output return True |