Skip to content

Commit

Permalink
♻️ add benchmarking workflow and implement CoinGecko benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
yezz123 committed Dec 12, 2024
1 parent 0d5e3e1 commit 8532b1c
Show file tree
Hide file tree
Showing 6 changed files with 313 additions and 2 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Task - Benchmarks

on:
workflow_dispatch:
workflow_call:

jobs:
cargo-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

# selecting a toolchain either by action or manual `rustup` calls should happen
# before the plugin, as the cache uses the current rustc version as its cache key
- run: rustup show

- uses: Swatinem/rust-cache@v2
- name: Benchmarks
run: |
cargo bench
5 changes: 5 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@ jobs:
name: Run Cargo linters
uses: ./.github/workflows/linters-cargo.yml
needs: rust_build

bench:
name: Run benchmarks
uses: ./.github/workflows/bench.yml
needs: rust_build
229 changes: 228 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,8 @@ uuid = { version = "1.4", features = ["fast-rng", "v4", "serde"] }

[dev-dependencies]
rstest = "0.18.2"
criterion = { version = "0.5", features = ["async_tokio"] }

[[bench]]
name = "coingecko_benchmarks"
harness = false
Loading

0 comments on commit 8532b1c

Please # to comment.