Skip to content

Commit

Permalink
Bencher GitHub Action main only
Browse files Browse the repository at this point in the history
  • Loading branch information
epompeii committed Nov 28, 2023
1 parent 0691c53 commit 59f8f11
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,22 +74,22 @@ jobs:
cargo +${{ matrix.toolchain }} build ${{ matrix.features_arg }} --release
benchmark:
if: github.ref == 'refs/heads/main'
name: Run benchmarks
runs-on: ubuntu-latest
env:
BENCHER_PROJECT: trace4rs
BENCHER_BRANCH: main
BENCHER_TESTBED: ubuntu-latest
BENCHER_ADAPTER: rust
BENCHER_VERSION: 0.2.27
BENCHER_ADAPTER: rust_criterion
BENCHER_API_TOKEN: ${{ secrets.BENCHER_API_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: Install
- uses: bencherdev/bencher@main
- name: Install Rust Nightly
run: |
rustup update
rustup toolchain install nightly
wget https://github.com/bencherdev/bencher/releases/download/v${BENCHER_VERSION}/bencher_${BENCHER_VERSION}_amd64.deb
sudo dpkg -i bencher_${BENCHER_VERSION}_amd64.deb
- name: Benchmark with Bencher
run: bencher run --if-branch $GITHUB_REF_NAME --err "cargo bench"
run: bencher run --err "cargo bench"

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ For a usage example see the `examples` folder or `src/test.rs`.

### Benchmarks & Results

<a href="https://bencher.dev/perf/trace4rs?reports_per_page=4&reports_page=1&branches_per_page=8&branches_page=1&testbeds_per_page=8&testbeds_page=1&benchmarks_per_page=8&benchmarks_page=1"><img src="https://api.bencher.dev/v0/projects/trace4rs/perf/img?metric_kinds=6daa0563-984c-40c9-8716-cad463cc693b&branches=7c0ad2df-9b1c-4361-b0a5-8d87f8002dd4&testbeds=15a6cfb2-7ff5-4c89-abe9-d153f08a5ae0&benchmarks=422c918d-bf2f-4470-87b7-f06f6fc854ea%2C6d950af0-8d62-46fa-96e6-f694921e3cb6&title=log4rs+vs+trace4rs" title="log4rs vs trace4rs" alt="log4rs vs trace4rs for trace4rs - Bencher" /></a>

The takeaway is that the actual appenders are roughly equivalent in
performance. However, when using the `tracing` macros vs the `log` macros
the appender performance is roughly 2 orders of magnitude larger.
Expand Down

0 comments on commit 59f8f11

Please sign in to comment.