diff --git a/tests/portstat_test.py b/tests/portstat_test.py index f3e8ef7178..d17afd9054 100644 --- a/tests/portstat_test.py +++ b/tests/portstat_test.py @@ -81,12 +81,12 @@ intf_fec_counters_period = """\ The rates are calculated within 3 seconds period - IFACE STATE FEC_CORR FEC_UNCORR FEC_SYMBOL_ERR ---------- ------- ---------- ------------ ---------------- -Ethernet0 D 0 0 0 -Ethernet4 N/A 0 0 0 -Ethernet8 N/A 0 0 0 -""" + IFACE STATE FEC_CORR FEC_UNCORR FEC_SYMBOL_ERR FEC_PRE_BER FEC_POST_BER FEC_PRE_BER_MAX FLR(O) FLR(P) (Accuracy) +--------- ------- ---------- ------------ ---------------- ------------- -------------- ----------------- -------- ------------------- +Ethernet0 D 0 0 0 N/A N/A N/A 0 0 +Ethernet4 N/A 0 0 0 N/A N/A N/A 4.21e-10 7.81e-10 (89%) +Ethernet8 N/A 0 0 0 N/A N/A N/A N/A N/A +""" # noqa: E501 intf_counters_period = """\ The rates are calculated within 3 seconds period @@ -454,8 +454,6 @@ def test_show_intf_fec_counters_period(self): assert return_code == 0 assert result == intf_fec_counters_period - - def test_show_intf_counters_period(self): runner = CliRunner() result = runner.invoke(show.cli.commands["interfaces"].commands["counters"], [ diff --git a/utilities_common/portstat.py b/utilities_common/portstat.py index 4a80a8a0df..d712439deb 100644 --- a/utilities_common/portstat.py +++ b/utilities_common/portstat.py @@ -760,12 +760,22 @@ def cnstat_diff_print(self, cnstat_new_dict, cnstat_old_dict, table.append((key, self.get_port_state(key), ns_diff(cntr['fec_corr'], old_cntr['fec_corr']), ns_diff(cntr['fec_uncorr'], old_cntr['fec_uncorr']), - ns_diff(cntr['fec_symbol_err'], old_cntr['fec_symbol_err']))) + ns_diff(cntr['fec_symbol_err'], old_cntr['fec_symbol_err']), + format_fec_ber(rates.fec_pre_ber), + format_fec_ber(rates.fec_post_ber), + format_fec_ber(rates.fec_pre_ber_max), + format_fec_flr(rates.fec_flr), + format_fec_flr_predicted(rates.fec_flr_predicted, rates.fec_flr_r_squared))) else: table.append((key, self.get_port_state(key), format_number_with_comma(cntr['fec_corr']), format_number_with_comma(cntr['fec_uncorr']), - format_number_with_comma(cntr['fec_symbol_err']))) + format_number_with_comma(cntr['fec_symbol_err']), + format_fec_ber(rates.fec_pre_ber), + format_fec_ber(rates.fec_post_ber), + format_fec_ber(rates.fec_pre_ber_max), + format_fec_flr(rates.fec_flr), + format_fec_flr_predicted(rates.fec_flr_predicted, rates.fec_flr_r_squared))) elif fec_hist_only: header = header_fec_hist_only