Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ jobs:
env:
MY_ENV_VAR: "YES"
with:
mode: instrumentation
run: cargo codspeed run
token: ${{ secrets.CODSPEED_TOKEN }}

Expand Down Expand Up @@ -113,11 +114,13 @@ jobs:
cargo codspeed build -p ${{ matrix.package }}

- name: Run the benchmarks
uses: CodSpeedHQ/action@main
uses: CodSpeedHQ/action@chore/runner-branch
env:
MY_ENV_VAR: "YES"
CODSPEED_PERF_ENABLED: true
with:
runner-branch: cod-1355-perf-flamegraph-doesnt-match-benchmark
mode: walltime
run: cargo codspeed run
token: ${{ secrets.CODSPEED_TOKEN }}

Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
[submodule "crates/divan_compat/examples/src/the_algorithms/Rust"]
path = crates/divan_compat/examples/src/the_algorithms/Rust
url = https://github.com/TheAlgorithms/Rust.git
[submodule "crates/codspeed/instrument-hooks"]
path = crates/codspeed/instrument-hooks
url = https://github.com/CodSpeedHQ/instrument-hooks
109 changes: 107 additions & 2 deletions Cargo.lock

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

3 changes: 3 additions & 0 deletions crates/codspeed/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ harness = false

[dev-dependencies]
tempfile = { workspace = true }

[build-dependencies]
bindgen = "0.72.1"
17 changes: 17 additions & 0 deletions crates/codspeed/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
use std::{env, path::PathBuf};

fn main() {
let bindings = bindgen::Builder::default()
.header("instrument-hooks/includes/core.h")
// Tell cargo to invalidate the built crate whenever any of the
// included header files changed.
.parse_callbacks(Box::new(bindgen::CargoCallbacks::new()))
.generate()
.expect("Unable to generate bindings");

// Write the bindings to the $OUT_DIR/bindings.rs file.
let out_path = PathBuf::from(env::var("OUT_DIR").unwrap());
bindings
.write_to_file(out_path.join("bindings.rs"))
.expect("Couldn't write bindings!");
}
1 change: 1 addition & 0 deletions crates/codspeed/instrument-hooks
Submodule instrument-hooks added at d094ae
Loading
Loading