mirror of
https://github.com/uutils/num-prime.git
synced 2026-06-10 16:12:35 -07:00
bench: exclude non-deterministic num-primes benchmarks by default
num-primes uses thread_rng() internally, making its benchmarks non-deterministic and causing false regressions in CodSpeed CI. Remove num-primes from default features so it's excluded from CI benchmarks. All num-primes bench_functions are gated behind #[cfg(feature = "num-primes")] - use --features num-primes to include them for local comparison.
This commit is contained in:
@@ -31,7 +31,7 @@ jobs:
|
||||
bins: cargo-codspeed
|
||||
|
||||
- name: Build the benchmark target(s)
|
||||
run: cargo codspeed build -m ${{ matrix.mode }} -p num-prime-bench --no-default-features
|
||||
run: cargo codspeed build -m ${{ matrix.mode }} -p num-prime-bench
|
||||
|
||||
- name: Run the benchmarks
|
||||
uses: CodSpeedHQ/action@v4
|
||||
|
||||
+2
-1
@@ -22,4 +22,5 @@ is_prime = "2.0.7"
|
||||
glass_pumpkin = "1.2.0"
|
||||
|
||||
[features]
|
||||
default = ["num-primes"]
|
||||
default = []
|
||||
num-primes = ["dep:num-primes"]
|
||||
|
||||
Reference in New Issue
Block a user