Skip to content

Conversation

ssithaia-ebay
Copy link

@ssithaia-ebay ssithaia-ebay commented Sep 5, 2025

What I did

  • Added queue rate counters to queuestat (and therefore show queue counters):
  • New JSON fields per queue: qpktsps, qbytesps, qbitsps.
  • New table columns (appended at the end of all header variants): Pkts/s, Bytes/s, Bits/s.
  • Kept default output shape backward-compatible (only appended columns; existing order unchanged).
  • Added unit tests to validate headers, table rendering, and JSON output.

How I did it

  • Extended queuestat headers: std_header, all_header, trim_header, and voq_header now end with ["Pkts/s", "Bytes/s", "Bits/s"].
  • Included per-queue rate keys in the JSON path as numeric strings (qpktsps, qbytesps, qbitsps) to match existing field typing.
  • Rate values are computed from counter deltas over time (first sample yields valid numeric strings; tests stub the data path to avoid DB deps).

How to verify it

pytest -q tests/queue_counter_test.py << all || trim || coq >>

This verifies:

  • All headers end with Pkts/s, Bytes/s, Bits/s.
  • json output contains qpktsps/qbytesps/qbitsps per queue (numeric strings).
  • Default/trim/voq table paths render the new columns and show values.

Previous command output (if the output of a command-line utility has changed)

root@sonic:~# show queue counters
     Port    TxQ    Counter/pkts    Counter/bytes    Drop/pkts    Drop/bytes   
---------  -----  --------------  ---------------  -----------  ------------  


New command output (if the output of a command-line utility has changed)

root@sonic:~# show queue counters
     Port    TxQ    Counter/pkts    Counter/bytes    Drop/pkts    Drop/bytes    Pkts/s    Bytes/s     Bits/s
---------  -----  --------------  ---------------  -----------  ------------  --------  ----------  --------

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants