aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/trex
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2018-04-27 15:11:12 +0200
committerPeter Mikus <pmikus@cisco.com>2018-05-04 11:46:26 +0000
commit35175924550d67f98fb1c2c50b0634656d29169e (patch)
treefe1008e80c9c6f09227dff84672bd0eaa831ff23 /resources/tools/trex
parent4bfd1dcd604dac12d1dd00ba63c0d5e4170a1f2b (diff)
CSIT-992: Add libraries for optimized search
+ Place the libraries into resources/libraries/python/search/. + Except OptimizedTrexSearch in TrafficGenerator.py + Change traffic generator to support floats for duration and warmup. + Remove explicit type conversions where not needed. + Add robot keywords to performance_utils.robot + for calling the optimized search. + for reporting the resulting values. + for checking the minimal performance has been reached. + for running five second "Traffic should pass with no loss" after the search. - Add methodology documentation in subsequent Change. - Add simulator for testing algorithm correctness in a subsequent Change. - Add tests using the libraries in subsequent Change. Change-Id: Ia041008382ee4c9a562172099aea794c854d5f2f Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources/tools/trex')
-rwxr-xr-xresources/tools/trex/trex_stateless_profile.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/resources/tools/trex/trex_stateless_profile.py b/resources/tools/trex/trex_stateless_profile.py
index c792f3eb48..e1e56d9ffe 100755
--- a/resources/tools/trex/trex_stateless_profile.py
+++ b/resources/tools/trex/trex_stateless_profile.py
@@ -87,9 +87,9 @@ def simple_burst(profile_file, duration, framesize, rate, warmup_time, port_0,
:param async_start: Start the traffic and exit.
:type profile_file: str
:type framesize: int or str
- :type duration: int
+ :type duration: float
:type rate: str
- :type warmup_time: int
+ :type warmup_time: float
:type port_0: int
:type port_1: int
:type latency: boo;
@@ -247,7 +247,7 @@ def main():
help="Python traffic profile.")
parser.add_argument("-d", "--duration",
required=True,
- type=int,
+ type=float,
help="Duration of traffic run.")
parser.add_argument("-s", "--frame_size",
required=True,
@@ -256,8 +256,8 @@ def main():
required=True,
help="Traffic rate with included units (%, pps).")
parser.add_argument("-w", "--warmup_time",
- type=int,
- default=5,
+ type=float,
+ default=5.0,
help="Traffic warm-up time in seconds, 0 = disable.")
parser.add_argument("--port_0",
required=True,
@@ -283,12 +283,12 @@ def main():
framesize = args.frame_size
simple_burst(profile_file=args.profile,
- duration=int(args.duration),
+ duration=args.duration,
framesize=framesize,
rate=args.rate,
- warmup_time=int(args.warmup_time),
- port_0=int(args.port_0),
- port_1=int(args.port_1),
+ warmup_time=args.warmup_time,
+ port_0=args.port_0,
+ port_1=args.port_1,
latency=args.latency,
async_start=args.async)