Skip to content

To add bandwidth metrics#35

Draft
chiangmaioneluv wants to merge 15 commits into
learning-at-home:masterfrom
chiangmaioneluv:master
Draft

To add bandwidth metrics#35
chiangmaioneluv wants to merge 15 commits into
learning-at-home:masterfrom
chiangmaioneluv:master

Conversation

@chiangmaioneluv

Copy link
Copy Markdown

To add basic bandwidth metrics + update protobuffs for communicating with hivemind

  1. uses default bandwidth counter from libp2p
  2. can be turned on / off on daemon start up with bandwidthMetricsEnabled option
  3. nice handle all the way to the DHT class in hivemind

Comment thread pb/Makefile Outdated

%.pb.go: %.proto
protoc --gogofast_out=. --proto_path=$(GOPATH)/src:. $<

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please resolve the merge conflict and make sure it works

Comment thread pb/p2pd.proto
optional double selfRateIn = 1;
optional double selfRateOut = 2;
repeated PeerInfo peers = 3;
} No newline at end of file

@justheuristic justheuristic Nov 28, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

missing end-of-file /n

@justheuristic

Copy link
Copy Markdown
Member

@dvmazur please take a look - you're way better at go than I am)

@justheuristic justheuristic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

My minor comments were resolved. Pending review from @dvmazur

@dvmazur

dvmazur commented Nov 28, 2023

Copy link
Copy Markdown
Collaborator

Hey, will take a look at this PR by tomorrow evening.

Comment thread daemon.go
d.bandwidth_metrics = metrics.NewBandwidthCounter()
opts = append(opts, libp2p.BandwidthReporter(d.bandwidth_metrics))
} else {
d.bandwidth_metrics = nil

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: d.bandwidth_metrics are nil be default anyway.
ignore this comment if you wish

@dvmazur

dvmazur commented Nov 29, 2023

Copy link
Copy Markdown
Collaborator

Other than the optional change I've suggested above, I have nothing to add to @justheuristic's comments.

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.

4 participants