- Notifications
You must be signed in to change notification settings - Fork32
🐰 Bencher - Continuous Benchmarking
License
bencherdev/bencher
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Bencher is a suite ofcontinuous benchmarking tools.Have you ever had a performance regression impact your users?Bencher could have prevented that from happening.Bencher allows you to detect and prevent performance regressionsbefore they hit production.
- Run: Run your benchmarks locally or in CI using your favorite benchmarking tools. The
bencher
CLI simply wraps your existing benchmark harness and stores its results. - Track: Track the results of your benchmarks over time. Monitor, query, and graph the results using the Bencher web console based on the source branch, testbed, benchmark, and measure.
- Catch: Catch performance regressions in CI. Bencher uses state of the art, customizable analytics to detect performance regressions before they make it to production.
For the same reasons that unit tests are run in CI to prevent feature regressions, benchmarks should be run in CI with Bencher to prevent performance regressions. Performance bugs are bugs!
Bencher consists of:
bencher
CLI- Bencher API Server
- Bencher Console Web UI
Though Bencher is open source, there is also a hosted version availableBencher Cloud.
The best place to start is theBencher Quick Start tutorial.
- Tutorial
- How To
- Explanation
- Reference
🌐 Also available in:
- {...} JSON
- #️⃣ C#
- ➕ C++
- 🕳 Go
- ☕️ Java
- 🕸 JavaScript
- 🐍 Python
♦️ Ruby- 🦀 Rust
- ❯_ Shell
👉 For more details see theexplanation of benchmark harness adapters.
Microsoft CCF | Rustls | Diesel |
Hydra Database | GreptimeDB | Tailcall |
Servo | Ratatui | Wire |
👉 Checkoutall public projects.
Install the Bencher CLI using theGitHub Action,and use it forcontinuous benchmarking in your project.
name:Continuous Benchmarking with Bencheron:push:branches:mainjobs:benchmark_with_bencher:name:Benchmark with Bencherruns-on:ubuntu-latestenv:BENCHER_PROJECT:my-project-slugBENCHER_API_TOKEN:${{ secrets.BENCHER_API_TOKEN }}steps: -uses:actions/checkout@v4 -uses:bencherdev/bencher@main -run:bencher run "bencher mock"
Supported Operating Systems:
- Linux (x86_64 & ARM64)
- macOS (x86_64 & ARM64)
- Windows (x86_64 & ARM64)
👉 For more details see theexplanation of how to use GitHub Actions.
AddBENCHER_API_TOKEN
to youRepository secrets (ex:Repo -> Settings -> Secrets and variables -> Actions -> New repository secret
). You can find your API tokens by runningbencher token list my-user-slug
orview them in the Bencher Console.
You can set thebencher run
CLI subcommand to errorifan Alert is generated with the--err
flag.
bencher run --err"bencher mock"
👉 For more details see theexplanation ofbencher run
.
You can set thebencher run
CLI subcommand to comment on a PR with the--github-actions
argument.
bencher run --github-actions"${{ secrets.GITHUB_TOKEN }}""bencher mock"
👉 For more details see theexplanation ofbencher run
.
Branch | 254/merge |
Testbed | ubuntu-latest |
🚨 1 ALERT: Threshold Boundary Limit exceeded!
Benchmark | Measure Units | View | Benchmark Result (Result Δ%) | Upper Boundary (Limit %) |
---|---|---|---|---|
Adapter::Json | Latency microseconds (µs) | 📈plot 🚨alert 🚷threshold | 3.45 (+1.52%) | 3.36 (102.48%) |
Click to view all benchmark results
Benchmark | Latency | Benchmark Results microseconds (µs) (Result Δ%) | Upper Boundary microseconds (µs) (Limit %) |
---|---|---|---|
Adapter::Json | 📈view plot 🚨view alert 🚷view threshold | 3.45 (+1.52%) | 3.36 (102.48%) |
Adapter::Magic (JSON) | 📈view plot 🚷view threshold | 3.43 (+0.69%) | 3.60 (95.40%) |
Adapter::Magic (Rust) | 📈view plot 🚷view threshold | 22.10 (-0.83%) | 24.73 (89.33%) |
Adapter::Rust | 📈view plot 🚷view threshold | 2.31 (-2.76%) | 2.50 (92.21%) |
Adapter::RustBench | 📈view plot 🚷view threshold | 2.30 (-3.11%) | 2.50 (91.87%) |
There is also an optionalversion
argument to specify an exact version of the Bencher CLI to use.Otherwise, it will default to using the latest CLI version.
-uses:bencherdev/bencher@mainwith:version:0.5.3
Specify an exact version if usingBencherSelf-Hosted.Donot specify an exact version if using BencherCloud as there are still occasional breaking changes.
Bencher is like CodeCov for performance metrics.
| I think I'm in heaven. Now that I'm starting to see graphs of performance over time automatically from tests I'm running in CI. It's like this whole branch of errors can be caught and noticed sooner.
|
95% of the time I don't want to think about my benchmarks. But when I need to, Bencher ensures that I have the detailed historical record waiting there for me. It's fire-and-forget.
| I've been looking for a public service like Bencher for about 10 years :)
|
I'm happy with how quickly I was able to get Bencher configured and working.
| Bencher's main ideas and concepts are really well designed.
|
The easiest way to contribute is to open this repo as aDev Container inVSCode by simply clicking one of the buttons below.Everything you need will already be there!Once set up, both the UI and API should be built, running, and seeded atlocalhost:3000 andlocalhost:61016 respectively.To make any changes to the UI or API though, you will have to exit the startup process and restart the UI and API yourself.
For additional information on contributing, see theDevelopment Getting Started guide.
There is also apre-built image from CI available for each branch:ghcr.io/bencherdev/bencher-dev-container
All content that resides under any directory orfeature named "plus" is licensed under theBencher Plus License.
All other content is licensed under theApache License, Version 2.0 orMIT License at your discretion.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Bencher by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.
About
🐰 Bencher - Continuous Benchmarking
Topics
Resources
License
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.