summaryrefslogtreecommitdiffstats
path: root/scripts/stl/flow_stats_latency.py
blob: 80d07363214553db2d53a5d8a4e3af4302c1d4bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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=50000),
                          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=50000),
                          flow_stats = STLFlowLatencyStats(pg_id = 12))
               ]


# dynamic load - used for trex console or simulator
def register():
    return STLS1()