summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl/trex_stl_lib
diff options
context:
space:
mode:
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.py10
1 files changed, 9 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 f9db22a1..98a08d55 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
@@ -980,7 +980,15 @@ class CLatencyStats(CTRexStats):
output[int_pg_id]['latency']['total_max'] = current_pg['latency']['h']['max_usec']
output[int_pg_id]['latency']['histogram'] = current_pg['latency']['h']['histogram']
zero_count = current_pg['latency']['h']['cnt'] - current_pg['latency']['h']['high_cnt']
- output[int_pg_id]['latency']['histogram'].append({'key':0, 'val':zero_count})
+ if zero_count != 0:
+ output[int_pg_id]['latency']['histogram'].append({'key':0, 'val':zero_count})
+ output[int_pg_id]['latency']['total_min'] = 1
+ else:
+ min_usec = current_pg['latency']['h']['max_usec']
+ for bucket in output[int_pg_id]['latency']['histogram']:
+ if bucket['key'] < min_usec:
+ min_usec = bucket['key']
+ output[int_pg_id]['latency']['total_min'] = min_usec
self.latest_stats = output
return True