google / packetdrill

The official Google release of packetdrill
GNU General Public License v2.0
887 stars 220 forks source link

packetdrill: implement relative time tolerance #42

Open sheepx86 opened 3 years ago

sheepx86 commented 3 years ago

Packetdrill tries to accommodate difference between expected time and observed time using a (configurable) maximum value of the difference.

For tests runing on slow hosts or with long running tests, the fixed tolerance may cause the test fail.

Add a new flag --tolerance_percent to allow the tolerance relative to the time difference of events. Default of 0.5 % means that 5ms of drift per second is allowed. The flag also applies to SCM_TIMESTAMPING records.