Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Report the average network bandwidth #1551

Merged
merged 2 commits into from
Jan 25, 2019
Merged

Conversation

tomaka
Copy link
Contributor

@tomaka tomaka commented Jan 24, 2019

Fix #1545

The file core/network-libp2p/src/transport/bandwidth.rs should eventually be moved to libp2p, but since libp2p master contains breaking changes, it would have been painful to integrate in Substrate on a short time frame.

We also now send bandwidth_download and bandwidth_upload to the telemetry (an integer containing the number of bytes per second), but the telemetry server doesn't interpret them.

Here is a picture:

substrate-bandwidth

@tomaka tomaka added the A0-please_review Pull request needs code review. label Jan 24, 2019
@tomaka tomaka added this to Triage in Networking (Outdated) via automation Jan 24, 2019
Copy link
Member

@bkchr bkchr left a comment

Choose a reason for hiding this comment

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

Looks good, just some minor grumbles.

struct TransferRateFormat(u64);
impl fmt::Display for TransferRateFormat {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
// We special case 0.
Copy link
Member

Choose a reason for hiding this comment

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

NITPICK^100000: Remove "we"

Ok(Async::Ready(Some((BandwidthFuture {
inner,
sinks: self.sinks.clone(),
}, addr))))
Copy link
Member

Choose a reason for hiding this comment

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

Weird formatting.

}

impl<TInner> tokio_io::AsyncRead for BandwidthConnecLogging<TInner>
where TInner: tokio_io::AsyncRead
Copy link
Member

Choose a reason for hiding this comment

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

Missing tab.

}

impl<TInner> Write for BandwidthConnecLogging<TInner>
where TInner: Write
Copy link
Member

Choose a reason for hiding this comment

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

same

core/network-libp2p/src/transport/bandwidth.rs Outdated Show resolved Hide resolved
@gavofyork gavofyork merged commit 4c8c836 into paritytech:master Jan 25, 2019
Networking (Outdated) automation moved this from Triage to Done Jan 25, 2019
@tomaka tomaka deleted the bandwidth branch January 25, 2019 11:07
andresilva pushed a commit that referenced this pull request Jan 31, 2019
* Report the average network bandwidth

* Fix concerns
MTDK1 pushed a commit to bdevux/substrate that referenced this pull request Apr 12, 2019
* Report the average network bandwidth

* Fix concerns
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants