Skip to content

Commit 58c455e

Browse files
authored
Add documentation on building, testing, benchmarking (#352)
1 parent c482379 commit 58c455e

File tree

2 files changed

+64
-2
lines changed

2 files changed

+64
-2
lines changed

CONTRIBUTING.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Contributing
2+
3+
## Building, testing, benchmarking
4+
5+
Building the library:
6+
7+
```
8+
cabal build
9+
```
10+
11+
Running the testsuite:
12+
13+
```
14+
cabal test
15+
```
16+
17+
Viewing the test options:
18+
19+
```
20+
cabal run tests -- --help
21+
```
22+
23+
Running a specific property test with an increased number of test cases
24+
(default: 100 cases):
25+
26+
```
27+
cabal run tests -- -p '/All.Properties.Data.HashSet.basic interface.member/' --quickcheck-tests 100_000
28+
```
29+
30+
Running the benchmarks:
31+
32+
```
33+
cabal bench
34+
```
35+
36+
Viewing the benchmark options:
37+
38+
```
39+
cabal run benches -- --help
40+
```
41+
42+
Running a specific benchmark with a reduced target standard deviation (default:
43+
5%):
44+
45+
```
46+
cabal run benches -- -p /All.HashMap.lookup-miss.ByteString/ --stdev 1
47+
```
48+
49+
To include comparison benchmarks for `containers` and `hashmap` uncomment the
50+
`cpp-options` in the benchmark section of `unordered-containers.cabal`:
51+
52+
```
53+
cpp-options: -DBENCH_containers_Map -DBENCH_containers_IntMap -DBENCH_hashmap_Map
54+
```
55+
56+
### References
57+
58+
* [Documentation for `cabal`](https://cabal.readthedocs.io/en/latest/)
59+
* [Documentation for our testing framework, `tasty`](https://github.com/UnkindPartition/tasty#readme)
60+
* [Documentation for our benchmark framework, `tasty-bench`](https://github.com/Bodigrim/tasty-bench#readme)

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ performance critical use, both in terms of large data quantities and high speed.
55

66
The declared cost of each operation is either worst-case or amortized, but
77
remains valid even if structures are shared.
8-
9-
For developer and contributor documentation see the
8+
9+
For background information and design considerations on this package see the
1010
[Developer Guide](docs/developer-guide.md).
11+
12+
For practical advice for contributors see [`CONTRIBUTING.md`](CONTRIBUTING.md).

0 commit comments

Comments
 (0)