8000 perf(p2p)!: Remove PeerSendBytesTotal metric (backport #3184) by mergify[bot] · Pull Request #3491 · cometbft/cometbft · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

perf(p2p)!: Remove PeerSendBytesTotal metric (backport #3184) #3491

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

Merged
merged 1 commit into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
`[p2p]` Remove `PeerSendBytesTotal` metric as it is costly to track,
and not that informative in debugging. ([\#3184](https://github.com/cometbft/cometbft/issues/3184))
1 change: 0 additions & 1 deletion docs/explanation/core/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ The following metrics are available:
| p2p\_message\_receive\_bytes\_total | Counter | message\_type | Number of bytes received from all peers per message type |
| p2p\_peers | Gauge | | Number of peers node's connected to |
| p2p\_peer\_receive\_bytes\_total | Counter | peer\_id, chID | Number of bytes per channel received from a given peer |
| p2p\_peer\_send\_bytes\_total | Counter | peer\_id, chID | Number of bytes per channel sent to a given peer |
| p2p\_peer\_pending\_send\_bytes | Gauge | peer\_id | Number of pending bytes to be sent to a given peer |
| p2p\_num\_txs | Gauge | peer\_id | Number of transactions submitted by each peer\_id |
| p2p\_pending\_send\_bytes | Gauge | peer\_id | Amount of data pending to be sent to peer |
Expand Down
7 changes: 0 additions & 7 deletions p2p/metrics.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8000
2 changes: 0 additions & 2 deletions p2p/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ type Metrics struct {
Peers metrics.Gauge
// Number of bytes received from a given peer.
PeerReceiveBytesTotal metrics.Counter `metrics_labels:"peer_id,chID"`
// Number of bytes sent to a given peer.
PeerSendBytesTotal metrics.Counter `metrics_labels:"peer_id,chID"`
// Pending bytes to be sent to a given peer.
PeerPendingSendBytes metrics.Gauge `metrics_labels:"peer_id"`
// Number of transactions submitted by each peer.
Expand Down
3 changes: 0 additions & 3 deletions p2p/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,6 @@ func (p *peer) send(chID byte, msg proto.Message, sendFunc func(byte, []byte) bo
}
res := sendFunc(chID, msgBytes)
if res {
p.metrics.PeerSendBytesTotal.
With("peer_id", string(p.ID()), "chID", p.mlc.ChIDToMetricLabel(chID)).
Add(float64(len(msgBytes)))
p.metrics.MessageSendBytesTotal.
With("message_type", metricLabelValue).
Add(float64(len(msgBytes)))
Expand Down
Loading
0