Skip to content

Add documentation on building, testing, benchmarking #352

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

Merged
merged 4 commits into from
Mar 1, 2022
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
60 changes: 60 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Contributing

## Building, testing, benchmarking

Building the library:

```
cabal build
```

Running the testsuite:

```
cabal test
```

Viewing the test options:

```
cabal run tests -- --help
```

Running a specific property test with an increased number of test cases
(default: 100 cases):

```
cabal run tests -- -p '/All.Properties.Data.HashSet.basic interface.member/' --quickcheck-tests 100_000
```

Running the benchmarks:

```
cabal bench
```

Viewing the benchmark options:

```
cabal run benches -- --help
```

Running a specific benchmark with a reduced target standard deviation (default:
5%):

```
cabal run benches -- -p /All.HashMap.lookup-miss.ByteString/ --stdev 1
```

To include comparison benchmarks for `containers` and `hashmap` uncomment the
`cpp-options` in the benchmark section of `unordered-containers.cabal`:

```
cpp-options: -DBENCH_containers_Map -DBENCH_containers_IntMap -DBENCH_hashmap_Map
```

### References

* [Documentation for `cabal`](https://cabal.readthedocs.io/en/latest/)
* [Documentation for our testing framework, `tasty`](https://github.com/UnkindPartition/tasty#readme)
* [Documentation for our benchmark framework, `tasty-bench`](https://github.com/Bodigrim/tasty-bench#readme)
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ performance critical use, both in terms of large data quantities and high speed.

The declared cost of each operation is either worst-case or amortized, but
remains valid even if structures are shared.
For developer and contributor documentation see the

For background information and design considerations on this package see the
[Developer Guide](docs/developer-guide.md).

For practical advice for contributors see [`CONTRIBUTING.md`](CONTRIBUTING.md).