aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools
diff options
context:
space:
mode:
Diffstat (limited to 'resources/tools')
-rwxr-xr-xresources/tools/trex/trex_stateless_profile.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/resources/tools/trex/trex_stateless_profile.py b/resources/tools/trex/trex_stateless_profile.py
index 90a4cf0bec..9323d8a859 100755
--- a/resources/tools/trex/trex_stateless_profile.py
+++ b/resources/tools/trex/trex_stateless_profile.py
@@ -21,6 +21,7 @@ latency.
import argparse
import json
import sys
+import time
sys.path.insert(
0, u"/opt/trex-core-2.73/scripts/automation/trex_control_plane/interactive/"
@@ -158,10 +159,13 @@ def simple_burst(
client.clear_stats()
# Choose rate and start traffic:
+ time_start = time.time()
client.start(ports=ports, mult=rate, duration=warmup_time)
# Block until done:
client.wait_on_traffic(ports=ports, timeout=warmup_time+30)
+ time_stop = time.time()
+ print(f"Warmup traffic took {time_stop - time_start} seconds.")
if client.get_warnings():
for warning in client.get_warnings():
@@ -187,6 +191,7 @@ def simple_burst(
lost_b = 0
# Choose rate and start traffic:
+ time_start = time.time()
client.start(ports=ports, mult=rate, duration=duration)
if async_start:
@@ -199,6 +204,8 @@ def simple_burst(
else:
# Block until done:
client.wait_on_traffic(ports=ports, timeout=duration+30)
+ time_stop = time.time()
+ print(f"Main traffic took {time_stop - time_start} seconds.")
if client.get_warnings():
for warning in client.get_warnings():