Skip to content

WIP: Add TCP traffic metrics#3769

Draft
vicsn wants to merge 1 commit intostagingfrom
tcp_metrics
Draft

WIP: Add TCP traffic metrics#3769
vicsn wants to merge 1 commit intostagingfrom
tcp_metrics

Conversation

@vicsn
Copy link
Collaborator

@vicsn vicsn commented Jul 31, 2025

Motivation

These were and will continue to be instrumental in improving snarkOS node performance.

Test Plan

  • Should run a full devnet to assess performance regressions.

@vicsn vicsn changed the title Revive TCP metrics WIP: Add TCP traffic metrics Jul 31, 2025
Comment on lines +51 to +52
tcp::TCP_GATEWAY_EVENTS_OUTBOUND,
tcp::TCP_GATEWAY_EVENTS_INBOUND,
Copy link
Collaborator

@ljedrz ljedrz Aug 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
tcp::TCP_GATEWAY_EVENTS_OUTBOUND,
tcp::TCP_GATEWAY_EVENTS_INBOUND,
tcp::TCP_GATEWAY_BYTES_OUTBOUND,
tcp::TCP_GATEWAY_BYTES_INBOUND,

IMO "events" would be more apt for the number of sent/received messages (which we might also want to track; they could even be used to detect DoS attempts)

Comment on lines +53 to +54
tcp::TCP_ROUTER_MESSAGES_OUTBOUND,
tcp::TCP_ROUTER_MESSAGES_INBOUND,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
tcp::TCP_ROUTER_MESSAGES_OUTBOUND,
tcp::TCP_ROUTER_MESSAGES_INBOUND,
tcp::TCP_ROUTER_BYTES_OUTBOUND,
tcp::TCP_ROUTER_BYTES_INBOUND,

Copy link
Collaborator

@ljedrz ljedrz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, today I realized we keep track of those metrics for the node already, it's just a matter of exposing it.

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