@@ -246,3 +246,46 @@ Rust code being written today.
246246- Compare the benchmarking time of the two versions.
247247- When adding the new version, for `perf-config.json` and the `N-*.patch`
248248 files, use the corresponding files for the old version as a starting point.
249+
250+ # Benchmark update policy
251+
252+ ## Background
253+
254+ rustc-perf is a "living benchmark suite" that is regularly changed. Some
255+ benchmarks in rustc-perf are verbatim copies of third-party crates. We
256+ periodically do a mass update of these benchmarks.
257+
258+ Benefits of this approach:
259+ - We ensure we are measuring compilation of the crates most people are using.
260+ This is most relevant for popular crates.
261+ - We get coverage of newer language features.
262+
263+ Costs of this approach:
264+ - It takes time and effort.
265+ - We lose some data continuity.
266+ - But the stable set of benchmarks used for the dashboard are not affected,
267+ and they provide the greatest continuity.
268+ - If the code hasn't changed much, it won't have much effect.
269+
270+ ## Update policy
271+
272+ - The third-party crates should be updated every three years. This is a
273+ reasonable refresh period that is neither too short or too long. It happens
274+ to match the Rust edition cycle, but this is just coincidence.
275+ - All third-party crates that have had at least one new release should be
276+ updated, even if not much code has changed. This avoids having to make
277+ decisions about whether a crate has changed enough.
278+ - When doing this mass update, there may be some benchmarks that are deemed no
279+ longer interesting and removed. For example, in the 2022 update we found that
280+ the `futures` crate was no longer interesting because all the functionality
281+ had been split into sub-crates that rustc-perf doesn't measure. Likewise,
282+ there may be some new benchmarks that are added.
283+ - New versions should be added before old versions are removed, to ensure
284+ continuity of profiling coverage.
285+ - The ad hoc addition and removal of individual benchmarks can continue
286+ independently of this update cycle, as per the judgment of the rustc-perf
287+ maintainers.
288+
289+ History:
290+ - The first mass update of third-party crates occurred in [March/April
291+ 2022](https://hackmd.io/d9uE7qgtTWKDLivy0uoVQw).
0 commit comments