good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
Erigon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
a
Erigon
Commits
d73075bd
Commit
d73075bd
authored
4 years ago
by
Péter Szilágyi
Committed by
Igor Mandrigin
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
p2p: measure packet throughput too, not just bandwidth
parent
d04e4b25
Loading
Loading
Loading
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
p2p/peer.go
+1
-0
1 addition, 0 deletions
p2p/peer.go
p2p/rlpx.go
+1
-0
1 addition, 0 deletions
p2p/rlpx.go
with
2 additions
and
0 deletions
p2p/peer.go
+
1
−
0
View file @
d73075bd
...
...
@@ -305,6 +305,7 @@ func (p *Peer) handle(msg Msg) error {
if
metrics
.
Enabled
{
m
:=
fmt
.
Sprintf
(
"%s/%s/%d/%#02x"
,
ingressMeterName
,
proto
.
Name
,
proto
.
Version
,
msg
.
Code
-
proto
.
offset
)
metrics
.
GetOrRegisterMeter
(
m
,
nil
)
.
Mark
(
int64
(
msg
.
meterSize
))
metrics
.
GetOrRegisterMeter
(
m
+
"/packets"
,
nil
)
.
Mark
(
1
)
}
select
{
case
proto
.
in
<-
msg
:
...
...
This diff is collapsed.
Click to expand it.
p2p/rlpx.go
+
1
−
0
View file @
d73075bd
...
...
@@ -597,6 +597,7 @@ func (rw *rlpxFrameRW) WriteMsg(msg Msg) error {
if
metrics
.
Enabled
&&
msg
.
meterCap
.
Name
!=
""
{
// don't meter non-subprotocol messages
m
:=
fmt
.
Sprintf
(
"%s/%s/%d/%#02x"
,
egressMeterName
,
msg
.
meterCap
.
Name
,
msg
.
meterCap
.
Version
,
msg
.
meterCode
)
metrics
.
GetOrRegisterMeter
(
m
,
nil
)
.
Mark
(
int64
(
msg
.
meterSize
))
metrics
.
GetOrRegisterMeter
(
m
+
"/packets"
,
nil
)
.
Mark
(
1
)
}
// write header
headbuf
:=
make
([]
byte
,
32
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment