egw-scale-utils: ensure consistent interval, and don't return on errors #189
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.
Modify the client loop to ensure that probes are sent evenly spread, with the desired interval (which is now configurable as a parameter), independently of the time spent establishing the connection or reading the data from it. Previously, instead, the fixed 50ms sleep could lead to skews, making results dependent on the actual network latency. Similarly, reading from the connection could block forever, as no deadline was explicitly set.
Additionally, let's change all connection errors to not be fatal, so that the client doesn't restart in case of timeouts. We were indeed observing this behavior in the actual tests (likely caused by SYN packets being dropped during datapath reconfiguration), partially invalidating the results. Errors are now instead treated as misses.