Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions tests/common/snappi_tests/traffic_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import re
import pandas as pd
from datetime import datetime
from tabulate import tabulate

from tests.common.helpers.assertions import pytest_assert
from tests.common.snappi_tests.common_helpers import config_capture_settings, get_egress_queue_count, \
Expand Down Expand Up @@ -676,9 +677,12 @@ def run_traffic(duthost,
flow_names = [metric.name for metric in in_flight_flow_metrics if metric.name in data_flow_names]
tx_frames = [metric.frames_tx for metric in in_flight_flow_metrics if metric.name in data_flow_names]
rx_frames = [metric.frames_rx for metric in in_flight_flow_metrics if metric.name in data_flow_names]
logger.info("In-flight traffic statistics for flows: {}".format(flow_names))
logger.info("In-flight TX frames: {}".format(tx_frames))
logger.info("In-flight RX frames: {}".format(rx_frames))
rows = list(zip(flow_names, tx_frames, rx_frames))
logger.info(
"In-flight traffic statistics for flows:\n%s",
tabulate(rows, headers=["Flow", "Tx", "Rx"], tablefmt="psql"),
)

logger.info("DUT polling complete")
else:
time.sleep(exp_dur_sec*(2/5)) # no switch polling required, only TGEN polling
Expand Down
Loading