Skip to content

Commit 49bab72

Browse files
committed
Improve documentation
1 parent bef37fb commit 49bab72

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

collector/compile-benchmarks/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# The Benchmark Suite
1+
# The Compile-time Benchmark Suite
22

3-
This file describes the programs in the benchmark suite and explains why they
3+
This file describes the programs in the compile-time benchmark suite and explains why they
44
were included.
55

66
The suite changes over time. Sometimes the code for a benchmark is updated, in
77
which case a small suffix will be added (starting with "-2", then "-3", and so
88
on.)
99

10-
There are three categories of benchmarks, **Primary**, **Secondary**, and
10+
There are three categories of compile-time benchmarks, **Primary**, **Secondary**, and
1111
**Stable**.
1212

1313
## Primary
@@ -198,7 +198,7 @@ Rust code being written today.
198198
applies correctly, e.g. `target/release/collector bench_local +nightly
199199
--id Test --profiles=Check --scenarios=IncrPatched
200200
--include=$NEW_BENCHMARK`
201-
- Add the new entry to `collector/benchmarks/README.md`.
201+
- Add the new entry to `collector/compile-benchmarks/README.md`.
202202
- `git add` the `Cargo.lock` file, if it's not already part of the
203203
benchmark's committed code.
204204
- If the benchmark has a `.gitignore` file that contains `Cargo.lock`,
@@ -232,7 +232,7 @@ Rust code being written today.
232232
- In the first commit just remove the old code.
233233
- Do this with `git rm -r` on the directory.
234234
- In the second commit do everything else.
235-
- Remove the entry from `collector/benchmarks/README.md`.
235+
- Remove the entry from `collector/compile-benchmarks/README.md`.
236236
- `git grep` for occurrences of the old benchmark name (e.g. in
237237
`.github/workflows/ci.yml` or `ci/check-*.sh`) and see if anything needs
238238
changing... usually not.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# The Runtime Benchmark Suite
2+
This directory contains various pieces of code for which we measure how fast do they execute
3+
when they are compiled with a specific version of `rustc`.
4+
5+
The benchmarks are located in crates that are part of the `runtime-benchmarks` workspace. Each crate
6+
contains a set of benchmarks defined using named closures.
7+
8+
Benchmarks are divided into sub-crates so that some benchmarks can use various versions of dependency
9+
crates and also so that they are grouped together by a relevant area (e.g. hashmap benchmarks).

collector/runtime-benchmarks/hashmap/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use benchlib::benchmark::BenchmarkSuite;
44
fn main() {
55
let mut suite = BenchmarkSuite::new();
66

7+
/// Measures how long does it take to insert 10 thousand numbers into a `hashbrown` hashmap.
78
suite.register("hashmap-insert-10k", || {
89
let mut map =
910
hashbrown::HashMap::with_capacity_and_hasher(10000, fxhash::FxBuildHasher::default());

0 commit comments

Comments
 (0)