summaryrefslogtreecommitdiffstats
path: root/scripts/api/stl/examples/stl_bi_dir_flows.py
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2016-01-31 17:44:56 +0200
committerHanoh Haim <hhaim@cisco.com>2016-01-31 17:44:56 +0200
commit2509553bb66732dc465ec5e2d9b710f5edabd362 (patch)
tree11449d11db52ea26d8faaaa58a7c327922414cbb /scripts/api/stl/examples/stl_bi_dir_flows.py
parent3eb4112dafd4ff78ad59cc78f7a4a00fd639e56a (diff)
parent1a935f2987f2885fc8af29ed866ec0b2125ee85c (diff)
Merge check x64 bit OS
Diffstat (limited to 'scripts/api/stl/examples/stl_bi_dir_flows.py')
-rw-r--r--scripts/api/stl/examples/stl_bi_dir_flows.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/api/stl/examples/stl_bi_dir_flows.py b/scripts/api/stl/examples/stl_bi_dir_flows.py
index 429445e6..38cb36dd 100644
--- a/scripts/api/stl/examples/stl_bi_dir_flows.py
+++ b/scripts/api/stl/examples/stl_bi_dir_flows.py
@@ -90,11 +90,11 @@ def simple_burst ():
# read the stats after the test
stats = c.get_stats()
- print json.dumps(stats["port 0"], indent = 4, separators=(',', ': '), sort_keys = True)
- print json.dumps(stats["port 1"], indent = 4, separators=(',', ': '), sort_keys = True)
+ print json.dumps(stats[0], indent = 4, separators=(',', ': '), sort_keys = True)
+ print json.dumps(stats[1], indent = 4, separators=(',', ': '), sort_keys = True)
- lost_a = stats["port 0"]["opackets"] - stats["port 1"]["ipackets"]
- lost_b = stats["port 1"]["opackets"] - stats["port 0"]["ipackets"]
+ lost_a = stats[0]["opackets"] - stats[1]["ipackets"]
+ lost_b = stats[1]["opackets"] - stats[0]["ipackets"]
print "\npackets lost from 0 --> 1: {0} pkts".format(lost_a)
print "packets lost from 1 --> 0: {0} pkts".format(lost_b)