Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Snappi] Support for DUT statistics - Interface counters, PFC counter…
…s, and Queue counters. (#13848) Description of PR Support to pull the DUT statistics, namely interface counters, PFC counters and Queue counters. This support will enable users to pull the DUT statistics run-time and capture them in form of dictionary for further processing. Summary: Fixes # (issue) #13843 Approach What is the motivation for this PR? Currently, there is no one stop-place to fetch the DUT statistics and use them for verification, especially the SNAPPI testcases. There should be some way to pull the DUT statistics ( at least important ones) and use them for verification. How did you do it? Clear counters: Common function to clear interface, PFC and queue counter stats. Interface counters: Ability to fetch the interface counters for a given DUT and port. Returns dictionary with keys - Rx and Tx packet count, Rx and Tx failures (Error + drops + ovr), and Rx and Tx throughput in Mbps. PFC counters: Ability to fetch the PFC counters for a given DUT and port. Returns dictionary with keys - Rx and Tx PFC for the given DUT, port and priority. Queue counters: Ability to fetch the Queue counters for a given DUT and port. Internally calls get_egress_queue_count for all the priorities. Returns dictionary with as key with transmitted packets as counter. How did you verify/test it? These functions are called as part of new testcases for PFC-ECN. for dut, port in dutport_list: f_stats = update_dict(m, f_stats, interface_stats(dut, port)) f_stats = update_dict(m, f_stats, get_pfc_count(dut, port)) f_stats = update_dict(m, f_stats, get_queue_count(dut, port)) These are then used to create CSV with raw DUT statistics and then to summarize the test in the end. co-authorized by: [email protected]
- Loading branch information