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.
This test simulates a network with a given latency and packet loss, and measures the
throughput between two virtual smoltcp instances. It seems to match what's expected. For example given a 1024b buffer the expected throughput is 1024b/100ms=10240b/s (at zero loss). and it checks out. Throughput goes down exponentially as loss increases.
Depends on #1025 for fixes to actually make tcp work and not get stuck. For example lack of zero window probes, and retransmits were broken in some edge cases.
I'm not sure how to actually use the test results. Options:
INSTA_UPDATE=always cargo test
to update the snapshot and get the test to pass, and in the PR diff we'll be able to review the effect on the throughput.insta
to save a dependency.Future work: