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
@@ -196,25 +197,21 @@ Rust code being written today.
196
197
`"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) for a complete reference.
198
199
- Consider adding one or more `N-*.patch` files for the `IncrPatched`
199
-
scenario.
200
-
- If it's a primary benchmark, you should definitely do this.
201
-
- These usually consist of a patch that adds a single
202
-
`println!("testing");` statement somewhere.
203
-
- Creating the patch against what you've committed so far might be useful.
204
-
Use `git diff` from the repository root, or `git diff --relative` within
205
-
the benchmark directory. Copy the output into the `N-*.patch` file.
206
-
- Do a test run with an `IncrPatched` scenario to make sure the patch
207
-
applies correctly, e.g. `target/release/collector bench_local +nightly
208
-
--id Test --profiles=Check --scenarios=IncrPatched
209
-
--include=$NEW_BENCHMARK`
200
+
scenario. - If it's a primary benchmark, you should definitely do this. - These usually consist of a patch that adds a single
201
+
`println!("testing");` statement somewhere. - Creating the patch against what you've committed so far might be useful.
202
+
Use `git diff` from the repository root, or `git diff --relative` within
203
+
the benchmark directory. Copy the output into the `N-*.patch` file. - Do a test run with an `IncrPatched` scenario to make sure the patch
204
+
applies correctly, e.g. `target/release/collector bench_local +nightly
205
+
--id Test --profiles=Check --scenarios=IncrPatched
206
+
--include=$NEW_BENCHMARK`
210
207
- Add the new entry to `collector/compile-benchmarks/README.md`.
211
208
- Add a new licensing entry to `collector/compile-benchmarks/REUSE.toml` (see existing entries
212
-
for inspiration).
209
+
for inspiration).
213
210
- If the benchmark is artificial, use the `MIT OR Apache-2.0` license and set Rust Project
214
-
developers as the copyright owners (see e.g. `await-call-tree` as an example).
211
+
developers as the copyright owners (see e.g. `await-call-tree` as an example).
215
212
- If the benchmark is a third-party crate, make sure to use its license. Try to find the
216
-
copyright owner in the crate's `COPYRIGHT` or `README` files. If you cannot find it, consider
217
-
using the copyright owner `<crate-name> contributors`.
213
+
copyright owner in the crate's `COPYRIGHT` or `README` files. If you cannot find it, consider
214
+
using the copyright owner `<crate-name> contributors`.
218
215
-`git add` the `Cargo.lock` file, if it's not already part of the
219
216
benchmark's committed code.
220
217
- If the benchmark has a `.gitignore` file that contains `Cargo.lock`,
@@ -262,8 +259,8 @@ Rust code being written today.
262
259
of the two versions to make sure nothing outrageous has happened. Once the
263
260
PR is merged, make sure it's running correctly.
264
261
- Second, remove the old version of the benchmark.
265
-
Doing it in two steps ensures we have continuity of profiling coverage in the
266
-
case where something goes wrong.
262
+
Doing it in two steps ensures we have continuity of profiling coverage in the
263
+
case where something goes wrong.
267
264
- Compare the benchmarking time of the two versions.
268
265
- When adding the new version, for `perf-config.json` and the `N-*.patch`
269
266
files, use the corresponding files for the old version as a starting point.
@@ -277,11 +274,13 @@ benchmarks in rustc-perf are verbatim copies of third-party crates. We
277
274
periodically do a mass update of these benchmarks.
278
275
279
276
Benefits of this approach:
277
+
280
278
- We ensure we are measuring compilation of the crates most people are using.
281
279
This is most relevant for popular crates.
282
280
- We get coverage of newer language features.
283
281
284
282
Costs of this approach:
283
+
285
284
- It takes time and effort.
286
285
- We lose some data continuity.
287
286
- But the stable set of benchmarks used for the dashboard are not affected,
@@ -308,5 +307,6 @@ Costs of this approach:
308
307
maintainers.
309
308
310
309
History:
310
+
311
311
- The first mass update of third-party crates occurred in [March/April
0 commit comments