Skip to content
Merged
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
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2853,12 +2853,13 @@ jobs:
cargo run --bin uv -- pip compile scripts/requirements/airflow.in --universal --exclude-newer 2024-08-08 --cache-dir .cache

- name: "Build benchmarks"
run: cargo codspeed build --profile profiling --features codspeed -p uv-bench
run: cargo codspeed build --profile profiling -p uv-bench

- name: "Run benchmarks"
uses: CodSpeedHQ/action@0b6e7a3d96c9d2a6057e7bcea6b45aaf2f7ce60b # v3.8.0
uses: CodSpeedHQ/action@6b43a0cd438f6ca5ad26f9ed03ed159ed2df7da9 # v4.1.1
with:
run: cargo codspeed run
mode: walltime
token: ${{ secrets.CODSPEED_TOKEN }}

benchmarks-instrumented:
Expand Down Expand Up @@ -2892,10 +2893,11 @@ jobs:
cargo run --bin uv -- pip compile scripts/requirements/airflow.in --universal --exclude-newer 2024-08-08 --cache-dir .cache

- name: "Build benchmarks"
run: cargo codspeed build --profile profiling --features codspeed -p uv-bench
run: cargo codspeed build --profile profiling -p uv-bench

- name: "Run benchmarks"
uses: CodSpeedHQ/action@0b6e7a3d96c9d2a6057e7bcea6b45aaf2f7ce60b # v3.8.0
uses: CodSpeedHQ/action@6b43a0cd438f6ca5ad26f9ed03ed159ed2df7da9 # v4.1.1
with:
run: cargo codspeed run
mode: instrumentation
token: ${{ secrets.CODSPEED_TOKEN }}
151 changes: 90 additions & 61 deletions Cargo.lock

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

6 changes: 1 addition & 5 deletions crates/uv-bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,12 @@ uv-types = { workspace = true }
uv-workspace = { workspace = true }

anyhow = { workspace = true }
codspeed-criterion-compat = { version = "3.0.2", default-features = false, optional = true }
criterion = { version = "0.7.0", default-features = false, features = [
"async_tokio",
] }
criterion = { version = "4.0.3", default-features = false, package = "codspeed-criterion-compat", features = ["async_tokio"] }
jiff = { workspace = true }
tokio = { workspace = true }

[package.metadata.cargo-shear]
ignored = ["uv-extract"]

[features]
codspeed = ["codspeed-criterion-compat"]
static = ["uv-extract/static"]
2 changes: 1 addition & 1 deletion crates/uv-bench/benches/uv.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::hint::black_box;
use std::str::FromStr;

use uv_bench::criterion::{Criterion, criterion_group, criterion_main, measurement::WallTime};
use criterion::{Criterion, criterion_group, criterion_main, measurement::WallTime};
use uv_cache::Cache;
use uv_client::{BaseClientBuilder, RegistryClientBuilder};
use uv_distribution_types::Requirement;
Expand Down
9 changes: 0 additions & 9 deletions crates/uv-bench/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
pub mod criterion {
//! This module re-exports the criterion API but picks the right backend depending on whether
//! the benchmarks are built to run locally or with codspeed

#[cfg(not(feature = "codspeed"))]
pub use criterion::*;

#[cfg(feature = "codspeed")]
pub use codspeed_criterion_compat::*;
}
Loading