X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=GPL%2Ftools%2Ftrex%2Ftrex_stl_profile.py;fp=GPL%2Ftools%2Ftrex%2Ftrex_stl_profile.py;h=51c9924668d0a0a270fae099779bb7e443352646;hp=324ad41cc0dcf9c976e4da478d8c273e13f365c8;hb=1fc868d1126b3e01afbadaac1d72b58d60f6e283;hpb=86ec9713ecde3d92ec4585d487ddfac5077428c8 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.