Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[action] [PR:13848] [Snappi] Support for DUT statistics - Interface counters, PFC counters, and Queue counters. #14429

Merged
merged 1 commit into from
Sep 5, 2024

Commits on Sep 5, 2024

  1. [Snappi] Support for DUT statistics - Interface counters, PFC counter…

    …s, and Queue counters. (sonic-net#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)
    sonic-net#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]
    amitpawar12 authored and mssonicbld committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    6c0b1fb View commit details
    Browse the repository at this point in the history