Improve coordinated omission handling
sbordet opened this issue · 2 comments
The load generator compensates for external pauses that cause missing samples by calculating the required samples to send in the next iteration.
However, the send time is not the intended send time, but rather it is always the actual send time.
When the resource rate is non-zero, the intended send time should be used.
A non-trivial glitch with the "intended" send time is that response times can now be negative.
This may happen when the load generator under-sleeps, the intended time is far in the future, and the response time comes back before the intended send time.
Yes, TimeUnit.NANOSECONDS.sleep(value)
may return earlier than expected.
Also, when using the intended send time, the load generator pauses are taken into account in the response times.
If the goal is to measure the server response times, the fact that the load generator pauses is not a fault of the server.
Using the actual send time will avoid to take into account the load generator pauses.