Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade criterion #1439

Merged
merged 13 commits into from Apr 29, 2024
5 changes: 2 additions & 3 deletions .github/workflows/test.yml
Expand Up @@ -79,8 +79,7 @@ jobs:
run: |
cargo test --target ${{ matrix.target }} --features=nightly
cargo test --target ${{ matrix.target }} --all-features
cargo test --target ${{ matrix.target }} --benches --features=small_rng,nightly
cargo test --target ${{ matrix.target }} --manifest-path rand_distr/Cargo.toml --benches
cargo test --target ${{ matrix.target }} --manifest-path benches/Cargo.toml --benches
cargo test --target ${{ matrix.target }} --lib --tests --no-default-features
- name: Test rand
run: |
Expand All @@ -104,7 +103,7 @@ jobs:
- name: Test rand_pcg
run: cargo test --target ${{ matrix.target }} --manifest-path rand_pcg/Cargo.toml --features=serde1
- name: Test rand_chacha
run: cargo test --target ${{ matrix.target }} --manifest-path rand_chacha/Cargo.toml
run: cargo test --target ${{ matrix.target }} --manifest-path rand_chacha/Cargo.toml --features=serde1

test-cross:
runs-on: ${{ matrix.os }}
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -11,6 +11,7 @@ You may also find the [Upgrade Guide](https://rust-random.github.io/book/update.
## [Unreleased]
- Add `rand::distributions::WeightedIndex::{weight, weights, total_weight}` (#1420)
- Bump the MSRV to 1.61.0
- Move all benchmarks to new `benches` crate (#1439)

## [0.9.0-alpha.1] - 2024-03-18
- Add the `Slice::num_choices` method to the Slice distribution (#1402)
Expand Down
128 changes: 67 additions & 61 deletions Cargo.lock.msrv

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

24 changes: 2 additions & 22 deletions Cargo.toml
Expand Up @@ -58,6 +58,7 @@ unbiased = []

[workspace]
members = [
"benches",
"rand_core",
"rand_distr",
"rand_chacha",
Expand All @@ -75,25 +76,4 @@ zerocopy = { version = "=0.8.0-alpha.6", default-features = false, features = ["
rand_pcg = { path = "rand_pcg", version = "=0.9.0-alpha.1" }
# Only to test serde1
bincode = "1.2.1"
rayon = "1.5.3"
criterion = { version = "0.4" }

[[bench]]
name = "uniform"
path = "benches/uniform.rs"
harness = false

[[bench]]
name = "seq_choose"
path = "benches/seq_choose.rs"
harness = false

[[bench]]
name = "shuffle"
path = "benches/shuffle.rs"
harness = false

[[bench]]
name = "uniform_float"
path = "benches/uniform_float.rs"
harness = false
rayon = "1.7"
40 changes: 40 additions & 0 deletions benches/Cargo.toml
@@ -0,0 +1,40 @@
[package]
name = "benches"
version = "0.1.0"
edition = "2021"
publish = false

[dependencies]

[dev-dependencies]
rand = { path = "..", features = ["small_rng", "nightly"] }
rand_pcg = { path = "../rand_pcg" }
rand_chacha = { path = "../rand_chacha" }
rand_distr = { path = "../rand_distr" }
criterion = "0.5"
criterion-cycles-per-byte = "0.6"

[[bench]]
name = "distributions"
path = "src/distributions.rs"
harness = false

[[bench]]
name = "uniform"
path = "src/uniform.rs"
harness = false

[[bench]]
name = "seq_choose"
path = "src/seq_choose.rs"
harness = false

[[bench]]
name = "shuffle"
path = "src/shuffle.rs"
harness = false

[[bench]]
name = "uniform_float"
path = "src/uniform_float.rs"
harness = false
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
23 changes: 0 additions & 23 deletions rand_distr/benches/Cargo.toml

This file was deleted.