Skip to content

Commit e85e083

Browse files
committed
Support Gilbert-Elliott packet-loss model
Replace LinkConditioner's per-packet drop rate with a two-state Gilbert-Elliott Markov model so simulated packet loss occurs in correlated bursts, matching real packet-loss behavior. Give `LinkConditioner` a good/bad state. A good state denotes the link is healthy and not dropping packets. A bad state denotes the link is dropping a lot of packets. It also opens up the possibility of adding an extra latency to packets during a bad state. Add builder methods to `LinkConditionerConfig` to configure the packet loss model. Closes #1546.
1 parent fdaa88d commit e85e083

3 files changed

Lines changed: 388 additions & 39 deletions

File tree

crates/io/link/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ bevy_ecs.workspace = true
2828
bevy_reflect.workspace = true
2929
bevy_utils.workspace = true
3030

31+
[dev-dependencies]
32+
approx.workspace = true
33+
3134
[lints]
3235
workspace = true
3336

0 commit comments

Comments
 (0)