import argparse
import json
import sys
+import time
sys.path.insert(
0, u"/opt/trex-core-2.73/scripts/automation/trex_control_plane/interactive/"
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():
lost_b = 0
# Choose rate and start traffic:
+ time_start = time.time()
client.start(ports=ports, mult=rate, duration=duration)
if async_start:
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():