summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl/examples
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-05-29 13:10:31 +0300
committerimarom <imarom@cisco.com>2016-05-29 13:12:19 +0300
commitdad5f59181ad000c5e43d96037377d9f1ce2d57a (patch)
tree47b4fcd2b1601153fc164ffd3d5a299edf49378e /scripts/automation/trex_control_plane/stl/examples
parent285e051d05ba4a7b59d0b8aa658237150906e5cb (diff)
parentb847ae93521380242ac976a1fb1b425648ce9fa2 (diff)
merge fix for double barrier
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/examples')
-rw-r--r--scripts/automation/trex_control_plane/stl/examples/stl_flow_latency_stats.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/automation/trex_control_plane/stl/examples/stl_flow_latency_stats.py b/scripts/automation/trex_control_plane/stl/examples/stl_flow_latency_stats.py
index df0605bf..86b91728 100644
--- a/scripts/automation/trex_control_plane/stl/examples/stl_flow_latency_stats.py
+++ b/scripts/automation/trex_control_plane/stl/examples/stl_flow_latency_stats.py
@@ -96,14 +96,15 @@ def rx_iteration (c, tx_port, rx_port, total_pkts, pkt_len, bw):
print(" Average latency(usec): {0}".format(avg))
print(" Jitter(usec): {0}".format(jitter))
print(" Latency distribution histogram:")
- hist.sort()
- for sample in hist:
- range_start = sample['key']
+ l = hist.keys()
+ l.sort()
+ for sample in l:
+ range_start = sample
if range_start == 0:
range_end = 10
else:
range_end = range_start + pow(10, (len(str(range_start))-1))
- val = sample['val']
+ val = hist[sample]
print (" Packets with latency between {0} and {1}:{2} ".format(range_start, range_end, val))
if tx_pkts != total_pkts: