-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
packetdrill: implement relative time tolerance #42
Open
sheepx86
wants to merge
3
commits into
google:master
Choose a base branch
from
sheepx86:tstolerance
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
wdebruij
reviewed
Aug 13, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please clean up the commit message for this commit?
sheepx86
changed the title
packetdrill : implement relative time tolerance
packetdrill: implement relative time tolerance
Aug 13, 2020
packetdrill tries to accommodate difference between expected time and observed time using a (configurable) maximum value of the difference. Add a percentage based tolerance, which is helpful for long running tests. Default of 0.5 % means that 5ms of drift per second is allowed. If one event happens 10 seconds after the last one, the tolerance would be 50 ms. Can be changed with --tolerance_percent=<percentage>
Packetdrill calculates the dynamic tolerance based on delta between time of the last and current event. This delta value is irrelevant for a blocking system call and the last event is unpredictable and depends on the timing. Instead we can use the delta between the start and end time specified in the packetdrill with an ellipse.
Packetdrill checks difference between expected time and observed time using a tolerance, which is set as the higher of a fixed value (tolerance_usecs) or a percentage(tolerance_percent) times duration. Extend this check for SCM_TIMESTAMPING records.
wdebruij
approved these changes
Aug 14, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Jian!
dcaratti
pushed a commit
to dcaratti/packetdrill
that referenced
this pull request
Feb 25, 2021
mptcp: new syscall test for full DATA_FIN handshake after close
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.
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.