aboutsummaryrefslogtreecommitdiffstats
path: root/GPL/tools/trex/trex_stl_profile.py
diff options
context:
space:
mode:
authorpmikus <peter.mikus@protonmail.ch>2023-10-11 12:12:48 +0000
committerPeter Mikus <peter.mikus@protonmail.ch>2023-10-11 12:57:32 +0000
commit1fc868d1126b3e01afbadaac1d72b58d60f6e283 (patch)
tree5f88e6f2eaf0103e9cc9d645bb5f8004a89e36b5 /GPL/tools/trex/trex_stl_profile.py
parent86ec9713ecde3d92ec4585d487ddfac5077428c8 (diff)
feat(core): Multilink TRex Async mode
Signed-off-by: pmikus <peter.mikus@protonmail.ch> Change-Id: I02468203f3eb4545b6662bad2ce9aa72ecd5a5f6
Diffstat (limited to 'GPL/tools/trex/trex_stl_profile.py')
-rw-r--r--GPL/tools/trex/trex_stl_profile.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/GPL/tools/trex/trex_stl_profile.py b/GPL/tools/trex/trex_stl_profile.py
index 324ad41cc0..51c9924668 100644
--- a/GPL/tools/trex/trex_stl_profile.py
+++ b/GPL/tools/trex/trex_stl_profile.py
@@ -1,6 +1,6 @@
#!/usr/bin/python3
-# Copyright (c) 2022 Cisco and/or its affiliates.
+# Copyright (c) 2023 Cisco and/or its affiliates.
#
# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
#
@@ -197,10 +197,9 @@ def simple_burst(
if async_start:
# For async stop, we need to export the current snapshot.
- xsnap0 = client.ports[0].get_xstats().reference_stats
- print(f"Xstats snapshot 0: {xsnap0!r}")
- xsnap1 = client.ports[1].get_xstats().reference_stats
- print(f"Xstats snapshot 1: {xsnap1!r}")
+ for i in range(len(client.ports)):
+ xsnap = client.ports[i].get_xstats().reference_stats
+ print(f"Xstats snapshot {i}: {xsnap!r}")
else:
time_start = time.monotonic()
# wait_on_traffic fails if duration stretches by 30 seconds or more.