aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/trex/trex_stateless_profile.py
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2019-01-02 14:18:50 +0100
committerVratko Polak <vrpolak@cisco.com>2019-05-10 14:26:34 +0000
commit752a4c3304581fa375f520fdb15a9f87604e11be (patch)
tree74ecbfcbe5ad68ee428f9e49e34a030bd6ebae74 /resources/tools/trex/trex_stateless_profile.py
parent217c3803fc75fd0388b2326593447038647f28bd (diff)
PLRsearch: Use stat trackers to shorten Integrator
+ Extract several tracker classes and use them in Integrator. + Apply next_rate workarounds to focus more on critical region. + Rewrite stretch function, as the previous implementation was wrong. + Rework logging: ++ Use injected trace() function in Integrator. ++ Inject function that skips trace logging on default initialization. ++ Use the same multiprocessing-safe passing, but separate queue. + Set duration to 120m in Robot, but keep at 30m in Python. + Apply minor changes to make computations more reproducible: ++ Attempt to log everything needed by reproducibility in one line. ++ Log samples used, and make it settable as upper limit. ++ Use repr output in TRex scripts, to avoid rounding when copypasting. +- Numpy seems to be sharing PRNG between processes. +-- An edit to disable one thread is needed for full reproducibility. +-- Such an edit is prepared, but will not be merged anytime soon. Change-Id: Icf56429b34ab6de2d18a12e6c676e2d242b3ba4c Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources/tools/trex/trex_stateless_profile.py')
-rwxr-xr-xresources/tools/trex/trex_stateless_profile.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/resources/tools/trex/trex_stateless_profile.py b/resources/tools/trex/trex_stateless_profile.py
index 61b244e21a..9b629754ca 100755
--- a/resources/tools/trex/trex_stateless_profile.py
+++ b/resources/tools/trex/trex_stateless_profile.py
@@ -245,11 +245,11 @@ def simple_burst(profile_file, duration, framesize, rate, warmup_time, port_0,
else:
if client:
client.disconnect()
- print("rate={0}, totalReceived={1}, totalSent={2}, "
+ print("rate={0!r}, totalReceived={1}, totalSent={2}, "
"frameLoss={3}, latencyStream0(usec)={4}, "
- "latencyStream1(usec)={5}".
+ "latencyStream1(usec)={5}, targetDuration={d!r}".
format(rate, total_rcvd, total_sent, lost_a + lost_b,
- lat_a, lat_b))
+ lat_a, lat_b, d=duration))
def main():