Unclear about units of packet-loss
opened this issue · comments
The README file indicates that --packet-loss=0.1
corresponds to 10% packet loss, but then further down lists profiles that would seem to include 150% or 200% packet loss. The code seems to indicate that 0.1 would actually mean 0.1%, not 10%.
It looks like there's actually a bug with the ipfw backend. The packet loss value should be multiplied by 100 like it is in tc so that 0.1 would correspond to 10%.
Actually, I take that back. I think the code is correct.
ipfw plr 0.1
=> drop 10% of packets
The profiles don't correspond correctly though.
since this is a simplification wrapper, would it not be better to change the command line flag to be a bit easier to understand, and just math the output to the wrapped system (tc or ipfw) to be the proper value?
like say --packet-loss=10% would get translated to 0.1 for ipfw
Would that not make it a bit easier to grasp? Should be pretty easy to modify while I'm overhauling the wrappers.
I think that would be the best option, personally. That way, regardless of backend, the user can be explicit about their desired settings.
Yeah, I agree.
#closeme