-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add skeleton for automated performance testing in CI (#1356)
This commit is a base for future performance testing in CI. - Set up GitHub workflow to run performance benchmarks on push to master - Enhance benchmarking tools to collect and serialize detaile statistics, now iggy-bench can output data to csv and toml files - Introduce scripts for executing standard performance suites and handling results - run-standard-performance-suite.sh - Ensure performance results are properly cached and artifacts are uploaded Desired outcome of whole feature is be able to present the results of benchmarks in grafana.
- Loading branch information
Showing
27 changed files
with
854 additions
and
335 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,44 @@ | ||
name: performance | ||
on: | ||
workflow_dispatch: | ||
# TODO(hubcio): uncomment when the workflow is ready | ||
# pull_request: | ||
# branches: | ||
# - master | ||
# push: | ||
# branches: | ||
# - master | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
run_benchmarks: | ||
runs-on: performance | ||
env: | ||
IGGY_CI_BUILD: true | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
ref: master | ||
fetch-depth: 0 | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Cache cargo & target directories | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
key: "v2" | ||
|
||
- name: Build iggy-server | ||
run: cargo build --release | ||
|
||
- uses: JarvusInnovations/background-action@v1 | ||
name: Run iggy-server in background | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
run: | | ||
target/release/iggy-server & | ||
wait-on: tcp:localhost:8090 | ||
wait-for: 1m | ||
log-output: true | ||
log-output-if: timeout | ||
tail: true | ||
|
||
# Write 10 GB of data to the disk (10 producers * 1000 batches * 1000 messages in batch * 1000 bytes per message) | ||
- name: Run send bench | ||
timeout-minutes: 1 | ||
run: target/release/iggy-bench --verbose --warmup-time 0 send tcp | ||
fetch-depth: 0 | ||
|
||
# Read 10 GB of data from the disk | ||
- name: Run poll bench | ||
timeout-minutes: 1 | ||
run: target/release/iggy-bench --verbose poll tcp | ||
- name: Verify working directory | ||
run: | | ||
pwd | ||
ls -la | ||
- name: Stop iggy-server | ||
timeout-minutes: 1 | ||
run: pkill -15 iggy-server && while pgrep -l iggy-server; do sleep 2; done; | ||
- name: Run predefined benchmarks | ||
timeout-minutes: 60 | ||
run: ./scripts/performance/run-standard-performance-suite.sh | ||
|
||
- name: Print iggy-server logs | ||
run: cat local_data/logs/iggy* | ||
- name: Upload benchmark results | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: performance_results | ||
path: performance_results* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ bench_* | |
/sdk/errors_table/ | ||
/rust-clippy-results.sarif | ||
/Cross.toml | ||
/performance_results* |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
pub mod common; | ||
pub mod kind; | ||
pub mod simple; | ||
|
||
mod defaults; | ||
mod examples; | ||
mod kind; | ||
mod props; | ||
mod transport; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.