[countersyncd]: Add communication statistics recording and utilities#4151
[countersyncd]: Add communication statistics recording and utilities#4151prsunny merged 3 commits intosonic-net:masterfrom
Conversation
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
9b268e0 to
9ffb842
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Ze Gan <ganze718@gmail.com>
9ffb842 to
13a10a8
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
This PR adds communication statistics recording and debugging utilities to countersyncd for analyzing online issues and performance. The changes introduce a new utilities module with functions for formatting hex dumps and tracking inter-actor channel statistics.
Changes:
- Added utilities module with hex formatting and channel statistics tracking
- Instrumented all actor message receive points to record queue lengths
- Added debug logging for raw netlink message payloads
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/countersyncd/src/utilities/mod.rs | New module providing hex formatting utility and communication statistics tracking with periodic logging |
| crates/countersyncd/src/main.rs | Added utilities module and initialized channel capacity tracking for all communication channels |
| crates/countersyncd/src/lib.rs | Exported the new utilities module |
| crates/countersyncd/src/actor/stats_reporter.rs | Added channel statistics recording for IpfixToStatsReporter channel |
| crates/countersyncd/src/actor/otel.rs | Added channel statistics recording for IpfixToOtel channel and cleaned up trailing whitespace |
| crates/countersyncd/src/actor/ipfix.rs | Added channel statistics recording for SwssToIpfixTemplates and DataNetlinkToIpfixRecords channels, cleaned up whitespace |
| crates/countersyncd/src/actor/data_netlink.rs | Added channel statistics recording for ControlNetlinkToDataNetlink channel and hex dump logging for netlink messages, cleaned up whitespace |
| crates/countersyncd/src/actor/counter_db.rs | Added channel statistics recording for IpfixToCounterDb channel |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| impl ChannelLabel { | ||
| fn as_str(self) -> &'static str { | ||
| match self { | ||
| ChannelLabel::ControlNetlinkToDataNetlink => "control_netlink->data_netlink_cmd", |
Signed-off-by: Ze Gan <ganze718@gmail.com>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Cherry-pick PR to msft-202412: Azure/sonic-swss.msft#199 |
|
@Pterosaur cherry pick PR didn't pass PR checker. Please check!!! |
1 similar comment
|
@Pterosaur cherry pick PR didn't pass PR checker. Please check!!! |
|
@Pterosaur @liat-grozovik please manually create 202511 as there are cherry pick conflicts. |
|
Retrigger msbuild bot |
|
Cherry-pick PR to 202511: #4222 |
What I did
Add more debug and statistics logs for countersyncd
Why I did it
Used for analyzing online issues and performance.
How I verified it
Locally check
Details if related