Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
continuous benchmarks based on load tests (#23849)
This PR sets up continuous benchmarking based on the collector loadtests using the [github-action-benchmark](https://github.com/benchmark-action/github-action-benchmark) project. This gives us charts with historical benchmark data based on prior runs of the load tests. You can see an example of the output in the screenshot below, or at this link: https://mwear.github.io/opentelemetry-collector-contrib/loadtest/. <img width="1107" alt="Screenshot 2023-06-29 at 12 07 05 PM" src="https://github.com/open-telemetry/opentelemetry-collector-contrib/assets/2513372/dab3f0b5-8c7a-4d39-a44f-6959ffac7889"> github-action-benchmark does not need an external datastore, but it does need GitHub pages to be enabled. It writes results as json to the GitHub pages branch. For this reason, the action is setup to run on commits to main, but not the pull requests themselves since PR authors do not have permissions to write to the gh-pages repository. This will require enabling GitHub pages and it assumes that `/docs` will be the folder the site is built from. Currently the action will write the benchmarks to `docs/benchmarks/loadtests` and the url to the benchmarks will be https://open-telemetry.github.io/opentelemetry-collector-contrib/benchmarks/loadtests/. We can change the locations if we'd like. For example: <img width="732" alt="Screenshot 2023-06-29 at 12 08 10 PM" src="https://github.com/open-telemetry/opentelemetry-collector-contrib/assets/2513372/2d8f465e-e6ec-41d4-a3bd-f102fa87ca40"> There are two PRs related to this work. This PR updates the testbed to write loadtest results in the format expected by github-action-benchmark, and updates the loadtests workflow to report the data. The [second PR](#23850) is for the `gh-pages` branch. It includes a customized version of github-action-benchmark template to render the results. While working on this, I have run the load tests and collected historical data leaving the rest of the codebase unchanged, and there is variation in the results based on the runner that picks up the job. In fact, all of the results in [example](https://mwear.github.io/opentelemetry-collector-contrib/loadtest/) were run on the same codebase. We will have to do future work to try to stabilize the loadtest results. One option to consider would be [self-hosted runners](https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners). Once we stabilize the run times we can enable additional alerts through the benchmark action. **Link to tracking Issue:** #9121, #20718 **Testing:** I tested that this works as expected on my repo. Benchmarks are reported on PRs that are merged to main, but not the PRs themselves. --------- Co-authored-by: Alex Boten <aboten@lightstep.com>
- Loading branch information