You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[`exhaustive_patterns`](https://github.com/rust-lang/rust/pull/79394)) of
@@ -169,90 +173,92 @@ Rust code being written today.
169
173
crate, and secondary if it's a stress test or intended to catch specific
170
174
regressions.
171
175
- If it's a third-party crate:
172
-
- If you are keen: talk with a maintainer of the crate to see if there is
173
-
anything we should be aware of when using this crate as a compile-time
174
-
benchmark.
175
-
- Look at [crates.io](https://crates.io) to find the latest (non-prerelease) version.
176
-
- Download it with `collector download -c $CATEGORY -a $ARTIFACT crate $NAME $VERSION`.
177
-
The `$CATEGORY` is probably `primary`. `$ARTIFACT` is either `library` or `binary`, depending
178
-
on what kind of artifact does the benchmark build.
176
+
- If you are keen: talk with a maintainer of the crate to see if there is
177
+
anything we should be aware of when using this crate as a compile-time
178
+
benchmark.
179
+
- Look at [crates.io](https://crates.io) to find the latest (non-prerelease) version.
180
+
- Download it with `collector download -c $CATEGORY -a $ARTIFACT crate $NAME $VERSION`.
181
+
The `$CATEGORY` is probably `primary`. `$ARTIFACT` is either `library` or `binary`, depending
182
+
on what kind of artifact does the benchmark build.
179
183
- It makes it easier for reviewers if you split things into two commits.
180
184
- In the first commit, just add the code for the entire benchmark.
181
-
- Do this by doing `git add` on the new directory.
182
-
- There is no need to remove seemingly unnecessary files such as
183
-
documentation or CI configuration.
185
+
- Do this by doing `git add` on the new directory.
186
+
- There is no need to remove seemingly unnecessary files such as
187
+
documentation or CI configuration.
184
188
- In the second commit, do everything else.
185
-
- Add `[workspace]` to the very bottom of the benchmark's `Cargo.toml`, if
186
-
doesn't already have a `[workspace]` section. This means commands like
187
-
`cargo build` will work within the benchmark directory.
188
-
- Add any necessary stuff to the `perf-config.json` file.
189
-
- If the benchmark is a sub-crate within a top-level crate, you'll need a
190
-
`"cargo_toml"` entry.
191
-
- If you get a "non-wrapped rustc" error when running it, you'll need a
192
-
`"touch_file"` entry.
193
-
- See [`collector/src/benchmark/mod.rs`](https://github.com/rust-lang/rustc-perf/blob/12cb796f8a932a891b385ba23a36d78a2867ace1/collector/src/benchmark/mod.rs#L24-L27) for a complete reference.
194
-
- Consider adding one or more `N-*.patch` files for the `IncrPatched`
195
-
scenario.
196
-
- If it's a primary benchmark, you should definitely do this.
197
-
- These usually consist of a patch that adds a single
198
-
`println!("testing");` statement somewhere.
199
-
- Creating the patch against what you've committed so far might be useful.
200
-
Use `git diff` from the repository root, or `git diff --relative` within
201
-
the benchmark directory. Copy the output into the `N-*.patch` file.
202
-
- Do a test run with an `IncrPatched` scenario to make sure the patch
203
-
applies correctly, e.g. `target/release/collector bench_local +nightly
204
-
--id Test --profiles=Check --scenarios=IncrPatched
205
-
--include=$NEW_BENCHMARK`
206
-
- Add the new entry to `collector/compile-benchmarks/README.md`.
207
-
-`git add` the `Cargo.lock` file, if it's not already part of the
208
-
benchmark's committed code.
209
-
- If the benchmark has a `.gitignore` file that contains `Cargo.lock`,
210
-
you'll need to comment out that line so that `Cargo.lock` gets uploaded
211
-
in the PR.
189
+
- Add `[workspace]` to the very bottom of the benchmark's `Cargo.toml`, if
190
+
doesn't already have a `[workspace]` section. This means commands like
191
+
`cargo build` will work within the benchmark directory.
192
+
- Add any necessary stuff to the `perf-config.json` file.
193
+
- If the benchmark is a sub-crate within a top-level crate, you'll need a
194
+
`"cargo_toml"` entry.
195
+
- If you get a "non-wrapped rustc" error when running it, you'll need a
196
+
`"touch_file"` entry.
197
+
-
198
+
See [`collector/src/benchmark/mod.rs`](https://github.com/rust-lang/rustc-perf/blob/12cb796f8a932a891b385ba23a36d78a2867ace1/collector/src/benchmark/mod.rs#L24-L27)
199
+
for a complete reference.
200
+
- Consider adding one or more `N-*.patch` files for the `IncrPatched`
201
+
scenario.
202
+
- If it's a primary benchmark, you should definitely do this.
203
+
- These usually consist of a patch that adds a single
204
+
`println!("testing");` statement somewhere.
205
+
- Creating the patch against what you've committed so far might be useful.
206
+
Use `git diff` from the repository root, or `git diff --relative` within
207
+
the benchmark directory. Copy the output into the `N-*.patch` file.
208
+
- Do a test run with an `IncrPatched` scenario to make sure the patch
209
+
applies correctly, e.g. `target/release/collector bench_local +nightly
210
+
--id Test --profiles=Check --scenarios=IncrPatched
211
+
--include=$NEW_BENCHMARK`
212
+
- Add the new entry to `collector/compile-benchmarks/README.md`.
213
+
-`git add` the `Cargo.lock` file, if it's not already part of the
214
+
benchmark's committed code.
215
+
- If the benchmark has a `.gitignore` file that contains `Cargo.lock`,
216
+
you'll need to comment out that line so that `Cargo.lock` gets uploaded
217
+
in the PR.
212
218
- Consider the benchmarking time for the benchmark.
213
-
- First, measure the entire compilation time with something like this, by
214
-
doing this within the benchmark directory is good:
0 commit comments