summaryrefslogtreecommitdiffstats
path: root/scripts/stl
diff options
context:
space:
mode:
authorIdo Barnea <ibarnea@cisco.com>2016-05-15 19:07:49 +0300
committerIdo Barnea <ibarnea@cisco.com>2016-05-18 19:23:46 +0300
commitc38d567b84cc9c8a5c2f88a598c89bbbb9b3279b (patch)
treea576bb2c4517b2a74478c10ed1b6db941f0e75bf /scripts/stl
parentdc75957648608bf0355fca31d4502ef41ee3a3a3 (diff)
fixes according to Hanoch's code review
Diffstat (limited to 'scripts/stl')
-rw-r--r--scripts/stl/flow_latency_stats.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/scripts/stl/flow_latency_stats.py b/scripts/stl/flow_latency_stats.py
new file mode 100644
index 00000000..334406e5
--- /dev/null
+++ b/scripts/stl/flow_latency_stats.py
@@ -0,0 +1,25 @@
+from trex_stl_lib.api import *
+import os
+
+# stream from pcap file. continues pps 10 in sec
+CP = os.path.join(os.path.dirname(__file__))
+
+class STLS1(object):
+
+ def get_streams (self, direction = 0, **kwargs):
+ return [STLStream(packet = STLPktBuilder(pkt = os.path.join(CP, "yaml/udp_64B_no_crc.pcap")), # path relative to pwd
+ mode = STLTXCont(pps=1000),
+ flow_stats = STLFlowLatencyStats(pg_id = 7)),
+
+ STLStream(packet = STLPktBuilder(pkt = os.path.join(CP, "yaml/udp_594B_no_crc.pcap")), # path relative to pwd
+ mode = STLTXCont(pps=5000),
+ flow_stats = STLFlowLatencyStats(pg_id = 12))
+ ]
+
+
+# dynamic load - used for trex console or simulator
+def register():
+ return STLS1()
+
+
+