torrust-tracker
torrust-tracker copied to clipboard
Add a workflow to run a basic benchmark for the UDP tracker
Every time there is a PR making big changes in the UDP tacker I run the aquatic UDP load test manually, just to make sure there is no performance regression. For example:
https://github.com/torrust/torrust-tracker/pull/873
It would be nice to do it automatically because there could be some changes that affect the performance in non ovbious ways.
Notes
- The workflow should be executed always not only when the UDP tracker code is directly affected. Changes in the core tracker can affect the UDP tracker. In fact, It would be a good way to detect performance regressions in other parts of the code.
- It can be hard to define the threshold. Ideally, we should run the test for the target branch and the PR branch. So we make sure the test is run in the same context.
cc @da2ce7
I think we should run benchmarks at different levels. We can start with the UDP tracker packages stack:
- main app
- udp-tracker-server
- udp-tracker-core
- tracker-core
- torrent-repository (we already have benchmark tests for this package)
If we run benchmarks at different levels we can not only detect performance problems but also know which layers is the bottleneck (if there is one). That would allow us to know where we can put our effort to improve performance the get the most from it.
@nuts-rice has added benchmarks here to this pacakges:
- udp-tracker-core
- http-tracker-core
And a shell script to run benchmarks for all the packages that have it:
contrib/dev-tools/benches/run-benches.sh
Relates to: https://github.com/torrust/torrust-tracker/pull/1370#issuecomment-2713881594