|
12 | 12 | import utilities_common.multi_asic as multi_asic_util |
13 | 13 | from utilities_common.netstat import ns_diff, table_as_json, format_brate, format_prate, \ |
14 | 14 | format_util, format_number_with_comma, format_util_directly, \ |
15 | | - format_fec_ber, format_fec_flr |
| 15 | + format_fec_ber, format_fec_flr, format_fec_flr_predicted |
16 | 16 |
|
17 | 17 | """ |
18 | 18 | The order and count of statistics mentioned below needs to be in sync with the values in portstat script |
|
45 | 45 | header_trim_only = ['IFACE', 'STATE', 'TRIM_PKTS', 'TRIM_TX_PKTS', 'TRIM_DRP_PKTS'] |
46 | 46 |
|
47 | 47 | rates_key_list = ['RX_BPS', 'RX_PPS', 'RX_UTIL', 'TX_BPS', 'TX_PPS', 'TX_UTIL', 'FEC_PRE_BER', |
48 | | - 'FEC_POST_BER', 'FEC_PRE_BER_MAX', 'FEC_FLR', 'FEC_FLR_PREDICTED'] |
| 48 | + 'FEC_POST_BER', 'FEC_PRE_BER_MAX', 'FEC_FLR', 'FEC_FLR_PREDICTED', 'FEC_FLR_R_SQUARED'] |
49 | 49 | ratestat_fields = ("rx_bps", "rx_pps", "rx_util", "tx_bps", "tx_pps", "tx_util", "fec_pre_ber", "fec_post_ber", |
50 | | - "fec_pre_ber_max", "fec_flr", "fec_flr_predicted") |
| 50 | + "fec_pre_ber_max", "fec_flr", "fec_flr_predicted", "fec_flr_r_squared") |
51 | 51 | RateStats = namedtuple("RateStats", ratestat_fields) |
52 | 52 |
|
53 | 53 | """ |
@@ -356,7 +356,7 @@ def get_rates(table_id): |
356 | 356 | """ |
357 | 357 | Get the rates from specific table. |
358 | 358 | """ |
359 | | - fields = ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"] |
| 359 | + fields = ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"] |
360 | 360 | for pos, name in enumerate(rates_key_list): |
361 | 361 | full_table_id = RATES_TABLE_PREFIX + table_id |
362 | 362 | counter_data = self.db.get(self.db.COUNTERS_DB, full_table_id, name) |
@@ -662,7 +662,7 @@ def cnstat_diff_print(self, cnstat_new_dict, cnstat_old_dict, |
662 | 662 | format_fec_ber(rates.fec_post_ber), |
663 | 663 | format_fec_ber(rates.fec_pre_ber_max), |
664 | 664 | format_fec_flr(rates.fec_flr), |
665 | | - format_fec_flr(rates.fec_flr_predicted))) |
| 665 | + format_fec_flr_predicted(rates.fec_flr_predicted, rates.fec_flr_r_squared))) |
666 | 666 | elif fec_hist_only: |
667 | 667 | header = header_fec_hist_only |
668 | 668 |
|
|
0 commit comments