Merged
Conversation
Co-authored-by: Jack Harper <rerpha@users.noreply.github.com>
Member
Tom-Willemsen
left a comment
There was a problem hiding this comment.
Haven't functionally reviewed yet but looks like it should work.
A few nit-pick comments...
| let mut bytes_this_second: usize = 0; | ||
| let mut total_bytes: usize = 0; | ||
| let mut stream = consumer.stream(); | ||
| let mut interval = time::interval(Duration::from_secs(1)); |
Member
There was a problem hiding this comment.
I think it makes sense for this to be configurable (i.e. passed in through command-line flags)
…other ticket) Co-authored-by: Jack Harper <rerpha@users.noreply.github.com>
| } | ||
| _ = interval.tick() => { | ||
| println!("{:.5} Mbit/s (since program start: average {:.5} Mbit/s, {:.5} MB total)", | ||
| bytes_this_second as f64/125000.0, |
Member
There was a problem hiding this comment.
This is only true if interval is 1.
Streaming at ~190 mbit/s with --interval 5:
985.75168 Mbit/s (since program start: average 189.82563 Mbit/s, 9609.95335 MB total)
bytes_this_second needs dividing by interval to be correct here
Tom-Willemsen
approved these changes
Apr 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Jack and I's 'Count' function for data streaming rate