Skip to content

Commit

Permalink
feat: add CodSpeed to the project
Browse files Browse the repository at this point in the history
  • Loading branch information
adriencaccia authored and CodSpeed Install Bot committed May 14, 2024
1 parent d3f844b commit 98041a1
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 81 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: codspeed-benchmarks

on:
# Run on pushes to the master branch
push:
branches:
- "master"
# Run on pull requests
pull_request:
# `workflow_dispatch` allows CodSpeed to trigger backtest
# performance analysis in order to generate initial data.
workflow_dispatch:

jobs:
benchmarks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup rust toolchain, cache and cargo-codspeed binary
uses: moonrepo/setup-rust@v1
with:
cache-target: release
bins: cargo-codspeed

- name: Build the benchmark target(s)
working-directory: v3
run: cargo codspeed build -p engine -p lang-graphql

- name: Run the benchmarks
uses: CodSpeedHQ/action@v2
with:
working-directory: v3
run: cargo codspeed run -p engine -p lang-graphql
46 changes: 0 additions & 46 deletions .github/workflows/hlint.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/lint.yml

This file was deleted.

38 changes: 36 additions & 2 deletions v3/Cargo.lock

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

2 changes: 1 addition & 1 deletion v3/crates/engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ url = "2.4.1"
build-data = "0.1.5" # To set short commit-sha at build time

[dev-dependencies]
criterion = { version = "0.5", features = ["html_reports", "async_tokio"] }
criterion = { package="codspeed-criterion-compat", version = "2.6.0", features = ["html_reports", "async_tokio"] }
goldenfile = "1.7.1"
mockito = { version = "1.1.0", default-features = false, features = [] }
pretty_assertions = "1.3.0"
Expand Down
2 changes: 1 addition & 1 deletion v3/crates/lang-graphql/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ apollo-parser = "0.7"
async-graphql-parser = "7.0"
bincode = "1.3.3"
bson = "2.10.0"
criterion = { version = "0.5", features = ["html_reports"] }
criterion = { package="codspeed-criterion-compat", version = "2.6.0", features = ["html_reports"] }
diffy = "0.3.0"
expect-test = "1.5"
graphql-parser = "0.4"
Expand Down

0 comments on commit 98041a1

Please sign in to comment.