Skip to content

Commit 5cab321

Browse files
authored
snappi:added fix for rx_l1_rate_gbps index error issue in traffic_generation.py file (sonic-net#16749)
Description of PR Summary: The metric 'Rx_L1_rate_Gbps' is picked from traffic item statistics. However, in 10.80, this is not working causing index error. Switching it to Rx_L1_rate_bps in the statistics file. Fixes # (issue) sonic-net#16731 Approach What is the motivation for this PR? Resolving index error in the traffic item statistics. Instead of capturing Gbps rates, which no longer exists, switched to bps rates. How did you do it? Single line of code: stats[metric_name+'_Rx_L1_Rate_bps'] = float(metric['Rx L1 Rate (bps)']) How did you verify/test it? Local clone. co-authorized by: jianquanye@microsoft.com
1 parent b5589e8 commit 5cab321

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/common/snappi_tests/traffic_generation.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,7 @@ def tgen_curr_stats(traf_metrics, flow_metrics, data_flow_names):
922922
stats[metric_name+'_txrate_Gbps'] = tx_rate_gbps
923923
stats[metric_name+'_rxrate_fps'] = float(metric['Rx Frame Rate'])
924924
stats[metric_name+'_rxrate_Gbps'] = rx_rate_gbps
925-
stats[metric_name+'_LI_rxrate_Gbps'] = float(metric['Rx L1 Rate (Gbps)'])
925+
stats[metric_name+'_Rx_L1_Rate_bps'] = float(metric['Rx L1 Rate (bps)'])
926926

927927
for metric in flow_metrics:
928928
if metric.name not in data_flow_names:

0 commit comments

Comments
 (0)