Adding a per-packet delay trace#21
Conversation
|
I added the log-normal per-packet delay trace. I did not implement the truncated correct version as I do not master the math to do it. |
|
Really thanks for your correction on typos across the crate and the implementations of the trace type and traits.
You don't have to implement the truncated correct version, or just leave it as it is. Once the fix for clippy warnings is pushed, I will merge and publish a new version of this crate to use in rattan. |
|
I'll take care of this on Monday |
|
Thank you. But can you revert your modification on CHANGELOG.md? 😂 I misunderstood you. You don't need to modify the changelog; it will be generated automatically on release. |
|
Will do so, no problems I was thinking that using |
|
Regarding However, I just noticed that here the |
|
Following Rust's best practice, I used But I agree with the fact that the non-homogeneity may be an issue |
|
At that time, I considered homogeneity, so I unified the signatures of all build functions to |
|
Really thanks for your contributions! |
Adding per-packet delay traces
Description
Following this discussion on rattan, I'm proposing the modification needed to
netem-trace.This pull request introduces a new type of trace, specifically a per-packet delay.
This trait allows the generation of delay on a packet basis, instead of a time spawn.
This is intended to be used to allow delaying packets in a way that may introduce reordering of packets.
Introduced types and traits:
DelayPerPacketTrace: the main traitStaticDelayPerPacket: a per-packet delay trace that returns a constant delay for a specific number of packetNormalizedDelayPerPacket: a per-packet delay trace that returns a delay produced by a seedable normal law for a specific number of packetRepeatedDelayPerPacketPattern: a per-packet delay trace which is a repetition of per-packet delay tracesDelayPerPacketTraceConfig: a trait to convert a config in the traceForever: a trait to convert a trace in an endless repetition of itself(I also corrected some typos)
How Has This Been Tested
I tested using the unit test and doc test included, I'm open to adding additional.
Types of changes
New feature (non-breaking change which adds functionality)
Checklist