Skip to content
Open
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: 9 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@ jobs:
- name: style
run: cargo fmt -- --check
- name: clippy
run: cargo clippy --all-targets --all-features -- -D warnings
run: cargo clippy --all-targets --features all -- -D warnings

shuttle:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@stable
- name: test
run: RUSTUP_TOOLCHAIN=stable cargo test --features shuttle --test shuttle

test:
runs-on: ubuntu-22.04
Expand Down
229 changes: 229 additions & 0 deletions Cargo.lock

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

7 changes: 7 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ categories = ["concurrency", "algorithms", "data-structures"]
[features]
all = ["raw-api", "typesize", "serde", "rayon", "arbitrary"]
raw-api = []
shuttle = ["dep:shuttle"]
typesize = ["dep:typesize"]
inline-more = ["hashbrown/inline-more"]

[dependencies]
lock_api = "0.4.12"
parking_lot_core = "0.9.10"
shuttle = { version = "0.9.1", optional = true }
equivalent = "1.0.1"
hashbrown = { version = "0.15.2", default-features = false }
serde = { version = "1.0.217", optional = true, features = ["derive"] }
Expand All @@ -33,3 +35,8 @@ typesize = { version = "0.1.13", default-features = false, features = ["hashbrow

[package.metadata.docs.rs]
features = ["all"]

[[test]]
name = "shuttle"
path = "tests/shuttle.rs"
required-features = ["shuttle"]
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,21 @@ I will take a look as soon as I have time for it.
That said I do not get paid (yet) to work on open-source. This means
that my time is limited and my work here comes after my personal life.

### Concurrency Testing

DashMap includes a contributor-only [Shuttle](https://docs.rs/shuttle)-based test mode for
model checking the internal lock implementation. This is not part of DashMap's supported
runtime feature surface and is only intended to be run through the dedicated integration
test target.

Use a current stable toolchain and run:

```bash
RUSTUP_TOOLCHAIN=stable cargo test --features shuttle --test shuttle
```

Running the full crate test suite with `--features shuttle` is intentionally unsupported.

## Performance

A comprehensive benchmark suite including DashMap can be found [here](https://github.com/xacrimon/conc-map-bench).
Expand Down
Loading
Loading