Repository navigation
feat(simulator): implement PacketSimulator for deterministic simulator - #2769
Merged
Merged
Conversation
PacketSimulator for deterministic networkPacketSimulator for deterministic simulator
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #2769 +/- ##
============================================
+ Coverage 67.58% 67.63% +0.05%
Complexity 708 708
============================================
Files 1027 1030 +3
Lines 83147 83846 +699
Branches 60004 60714 +710
============================================
+ Hits 56195 56711 +516
- Misses 24612 24775 +163
- Partials 2340 2360 +20
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
numinnex
reviewed
Feb 20, 2026
numinnex
approved these changes
Feb 20, 2026
PacketSimulator for deterministic simulator
Member
Author
|
I think both of these are flaky integration tests.
|
numinnex
previously approved these changes
Feb 25, 2026
krishvishal
force-pushed
the
network-sim
branch
from
February 27, 2026 03:57
dfb2405 to
baaaccb
Compare
mmodzelewski
approved these changes
Feb 27, 2026
numinnex
approved these changes
Feb 27, 2026
kriti-sc
pushed a commit
to kriti-sc/iggy
that referenced
this pull request
Mar 6, 2026
apache#2769) Summary: - Adds a `PacketSimulator` that models a full network fault-injection layer: per-path latency (exponential distribution), packet loss, link capacity limits with random eviction, automatic network partitioning with configurable lifecycle, and per-path clogging. - Adds a `ReadyQueue` — a min-heap priority queue with reservoir-sampled random ready removal, used to order packets by delivery tick and uniformly select among simultaneously ready items. - Partition modes: `UniformSize`, `UniformPartition`, `IsolateSingle`, all guarantee at least one node in each partition. Supports symmetric and asymmetric partitions. Note: - Pull-based batch delivery: `step()` returns all ready packets for the current tick in a single Vec. Packets delivered in the same tick cannot trigger chain reactions within that tick. This was done because its difficult to do self-referential structs in Rust and even with using dynamic dispatch we have to fight the borrow checker since we would need mutable access to different fields at the same time.
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.
Summary:
PacketSimulatorthat models a full network fault-injection layer: per-path latency (exponential distribution), packet loss, link capacity limits with random eviction, automatic network partitioning with configurable lifecycle, and per-path clogging.ReadyQueue— a min-heap priority queue with reservoir-sampled random ready removal, used to order packets by delivery tick and uniformly select among simultaneously ready items.UniformSize,UniformPartition,IsolateSingle, all guarantee at least one node in each partition. Supports symmetric and asymmetric partitions.Note:
step()returns all ready packets for the current tick in a single Vec. Packets delivered in the same tick cannot trigger chain reactions within that tick. This was done because its difficult to do self-referential structs in Rust and even with using dynamic dispatch we have to fight the borrow checker since we would need mutable access to different fields at the same time.