Within the bench client, the start time is taken before the test rounds commence.
The cb.init() is run first and then the rounds progress.
Because the cb.init() may take some time, this means that the start time becomes invalid and consequently the rate control will not work as intended.
For example:
if sleep time = 0.5s
start time = 0
cb.init() takes 10s to complete
Then the rateControl will not work correctly for the first 20 transactions since the time per transaction has not caught up with the cb.init() delay. The result of this is that the initial set of transactions will be sent immediately, which is not the intention.
This pull request moves the setting of the start time used in the rate control into the round reduction loop, and is set on the first main test item.
Within the bench client, the start time is taken before the test rounds commence.
The cb.init() is run first and then the rounds progress.
Because the cb.init() may take some time, this means that the start time becomes invalid and consequently the rate control will not work as intended.
For example:
This pull request moves the setting of the start time used in the rate control into the round reduction loop, and is set on the first main test item.