Skip to content

Commit

Permalink
add fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Vaibhav Dahiya <vdahiya@microsoft.com>
  • Loading branch information
vdahiya12 committed Sep 10, 2024
1 parent 777611f commit 486992e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
8 changes: 4 additions & 4 deletions show/interfaces/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,14 +681,14 @@ def fetch_fec_histogram(port_oid_map, target_port):

if asic_db_kvp is not None:
fec_errors = {f'BIN{i}': asic_db_kvp.get
(f'SAI_PORT_STAT_IF_IN_FEC_CODEWORD_ERRORS_S{i}', '0') for i in range(16)}
(f'SAI_PORT_STAT_IF_IN_FEC_CODEWORD_ERRORS_S{i}', '0') for i in range(16)}

# Prepare the data for tabulation
table_data = [(bin_label, error_value) for bin_label, error_value in fec_errors.items()]

# Define headers
headers = ["Symbol Errors Per Codeword", "Codewords"]

# Print FEC histogram using tabulate
click.echo(tabulate(table_data, headers=headers))
else:
Expand Down
36 changes: 18 additions & 18 deletions tests/portstat_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,24 @@
"""

intf_fec_counters_fec_hist = """\
Symbol Errors Per Codeword Codewords
-------------------------- ---------
BIN0: 1000000
BIN1: 900000
BIN2: 800000
BIN3: 700000
BIN4: 600000
BIN5: 500000
BIN6: 400000
BIN7: 300000
BIN8: 0
BIN9: 0
BIN10: 0
BIN11: 0
BIN12: 0
BIN13: 0
BIN14: 0
BIN15: 0
Symbol Errors Per Codeword Codewords
---------------------------- -----------
BIN0 1000000
BIN1 900000
BIN2 800000
BIN3 700000
BIN4 600000
BIN5 500000
BIN6 400000
BIN7 300000
BIN8 0
BIN9 0
BIN10 0
BIN11 0
BIN12 0
BIN13 0
BIN14 0
BIN15 0
"""

intf_fec_counters_period = """\
Expand Down

0 comments on commit 486992e

Please sign in to comment.