Skip to content

Commit e53cc5b

Browse files
committed
Update glossary to add the notion of runtime benchmarks
1 parent 8b5aeac commit e53cc5b

File tree

2 files changed

+27
-13
lines changed

2 files changed

+27
-13
lines changed

database/schema.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ id name date type
6565

6666
A "collection" of benchmarks tied only differing by the statistic collected.
6767

68+
This corresponds to a [`test result`](../docs/glossary.md#testing).
69+
6870
This is a way to collect statistics together signifying that they belong to the same logical benchmark run.
6971

7072
Currently, the collection also marks the git sha of the currently running collector binary.
@@ -125,6 +127,8 @@ of a crate, profile, scenario and the metric being collected.
125127
* cache (aka `scenario`): describes how much of the incremental cache is full. An empty incremental cache means that the compiler must do a full build.
126128
* statistic (aka `metric`): the type of metric being collected
127129

130+
This corresponds to a [`statistic description`](../docs/glossary.md).
131+
128132
There is a separate table for this collection to avoid duplicating crates, prfiles, scenarios etc.
129133
many times in the `pstat` table.
130134

docs/glossary.md

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,40 @@
22

33
The following is a glossary of domain specific terminology. Although benchmarks are a seemingly simple domain, they have a surprising amount of complexity. It is therefore useful to ensure that the vocabulary used to describe the domain is consistent and precise to avoid confusion.
44

5-
## Basic terms
5+
## Common terms
6+
7+
* **metric**: a name of a quantifiable metric being measured (e.g., instruction count).
8+
* **artifact**: a specific rustc binary labeled by some identifier tag (usually a commit sha or some sort of human readable id like "1.51.0" or "test").
9+
10+
## Compile-time benchmark terms
611

712
* **benchmark**: the source of a crate which will be used to benchmark rustc. For example, ["hello world"](https://github.com/rust-lang/rustc-perf/tree/master/collector/compile-benchmarks/helloworld).
813
* **profile**: a [cargo profile](https://doc.rust-lang.org/cargo/reference/profiles.html). Note: the database uses "opt" whereas cargo uses "release".
914
* **scenario**: The scenario under which a user is compiling their code. Currently, this is the incremental cache state and an optional change in the source since last compilation (e.g., full incremental cache and a `println!` statement is added).
10-
* **metric**: a name of a quantifiable metric being measured (e.g., instruction count)
11-
* **artifact**: a specific rustc binary labeled by some identifier tag (usually a commit sha or some sort of human readable id like "1.51.0" or "test")
1215
* **category**: a high-level group of benchmarks. Currently, there are three categories, primary (mostly real-world crates), secondary (mostly stress tests), and stable (old real-world crates, only used for the dashboard).
1316

14-
## Benchmarks
17+
### Types of compile-time benchmarks
18+
19+
* **stress test benchmark**: a benchmark that is specifically designed to stress a certain part of the compiler. For example, [projection-caching](https://github.com/rust-lang/rustc-perf/tree/master/collector/compile-benchmarks/projection-caching) stresses the compiler's projection caching mechanisms. Corresponds to the `secondary` category.
20+
* **real world benchmark**: a benchmark based on a real world crate. These are typically copied as-is from crates.io. For example, [serde](https://github.com/rust-lang/rustc-perf/tree/master/collector/compile-benchmarks/serde-1.0.136) is a popular crate and the benchmark has not been altered from a release of serde on crates.io. Corresponds to the `primary` or `stable` categories.
21+
22+
## Runtime benchmark terms
1523

16-
* **stress test benchmark**: a benchmark that is specifically designed to stress a certain part of the compiler. For example, [projection-caching](https://github.com/rust-lang/rustc-perf/tree/master/collector/compile-benchmarks/projection-caching) stresses the compiler's projection caching mechanisms.
17-
* **real world benchmark**: a benchmark based on a real world crate. These are typically copied as-is from crates.io. For example, [serde](https://github.com/rust-lang/rustc-perf/tree/master/collector/compile-benchmarks/serde-1.0.136) is a popular crate and the benchmark has not been altered from a release of serde on crates.io.
24+
* **benchmark**: a function compiled by rustc, which function will be benchmarked.
25+
* **benchmark group**: a crate that contains a set of runtime benchmarks.
1826

19-
## Testing
27+
## Testing
2028

21-
* **test case**: a combination of a benchmark, a profile, and a scenario.
22-
* **test**: the act of running an artifact under a test case. Each test result is composed of many iterations.
23-
* **test iteration**: a single iteration that makes up a test. Note: we currently normally run 2 test iterations for each test.
24-
* **test result**: the result of the collection of all statistics from running a test. Currently, the minimum value of a statistic from all the test iterations is used.
25-
* **statistic**: a single value of a metric in a test result
29+
* **test case**: a combination of parameters that describe the measurement of a single (compile-time or runtime) benchmark - a single `test`
30+
- For compile-time benchmarks, it is a combination of a benchmark, a profile, and a scenario.
31+
- For runtime benchmarks, it is currently only the benchmark name.
32+
* **test**: the act of running an artifact under a test case. Each test is composed of many iterations.
33+
* **test iteration**: a single iteration that makes up a test. Note: we currently normally run 3 test iterations for each test.
34+
* **test result**: the result of the collection of all statistics from running a test. Currently, the minimum value of a statistic from all the test iterations is used for analysis calculations and the website.
35+
* **statistic**: a single measured value of a metric in a test result
2636
* **statistic description**: the combination of a metric and a test case which describes a statistic.
2737
* **statistic series**: statistics for the same statistic description over time.
28-
* **run**: a collection of test results for all currently available test cases run on a given artifact.
38+
* **run**: a set of tests for all currently available test cases measured on a given artifact.
2939

3040
## Analysis
3141

0 commit comments

Comments
 (0)