Make fixed load rate controller honor the target duration
Checklist
- ~~A link to the issue/user story that the pull request relates to~~
- [x] How to recreate the problem without the fix
- [x] Design of the fix
- [x] How to prove that the fix works
- [x] Automated tests that prove the fix keeps on working
- ~~Documentation - any JSDoc, website, or Stackoverflow answers?~~
Issue/User story
When using the fixed load rate controller we did run into issues where a hanging SUT or a suden drop in the SUT's TPS caused our target duration exceeded by a factor of 50.
Steps to Reproduce
Running the benchmarks added in https://github.com/hyperledger/besu/pull/2716 with higher transaction backlogs than used in https://github.com/hyperledger/besu/pull/2716/files#diff-bbce9037b01a9a2ee863e5a760f513e416f2efa57669582a6c316a168044c310 causes this behaviour--e.g. with backlog 300 instead of the used 200. The benchmarks can be executed using cd benchmark && docker-compose -f docker-compose.yml run caliper.
Existing issues
- [ ] Stack Overflow issues
- [ ] GitHub Issues
- [ ] Rocket Chat history
Design of the fix
- The total runtime of a round is bounded by twice the target duration. Exceeding it causes aborting with an exception.
- The fixed load rate controller is modified to wait indefinitely as long as the target backlog size is exceeded by a factor of more than two.
Validation of the fix
- [x] Tested via unit test
- [ ] Tested using the above mentioned besu benchmark suite
Automated Tests
Unit tests are adapted and added for the fixed load rate controller.
What documentation has been provided for this pull request
None.
Closing and re-opening to trigger updated CI checks
@taccatisid Related discussion aside, a left-over console statement fails the lint check: https://dev.azure.com/Hyperledger/Caliper/_build/results?buildId=44734&view=logs&j=6b58850f-3858-5a05-33e2-5e41cbf03c4e&t=19b1bfe6-3af6-53e3-4680-83bf488ecd43&l=78
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.