diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:26:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:26:03 +0000 |
commit | 9918693037dce8aa4bb6f08741b6812923486c18 (patch) | |
tree | 21d2b40bec7e6a7ea664acee056eb3d08e15a1cf /src/tools/cargo/benches/README.md | |
parent | Releasing progress-linux version 1.75.0+dfsg1-5~progress7.99u1. (diff) | |
download | rustc-9918693037dce8aa4bb6f08741b6812923486c18.tar.xz rustc-9918693037dce8aa4bb6f08741b6812923486c18.zip |
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tools/cargo/benches/README.md')
-rw-r--r-- | src/tools/cargo/benches/README.md | 39 |
1 files changed, 36 insertions, 3 deletions
diff --git a/src/tools/cargo/benches/README.md b/src/tools/cargo/benches/README.md index b4b8b190a..900bf084c 100644 --- a/src/tools/cargo/benches/README.md +++ b/src/tools/cargo/benches/README.md @@ -9,7 +9,23 @@ cd benches/benchsuite cargo bench ``` -The tests involve downloading the index and benchmarking against some +However, running all benchmarks would take many minutes, so in most cases it +is recommended to just run the benchmarks relevant to whatever section of code +you are working on. + +## Benchmarks + +There are several different kinds of benchmarks in the `benchsuite/benches` directory: + +* `global_cache_tracker` — Benchmarks saving data to the global cache tracker + database using samples of real-world data. +* `resolve` — Benchmarks the resolver against simulations of real-world workspaces. +* `workspace_initialization` — Benchmarks initialization of a workspace + against simulations of real-world workspaces. + +### Resolve benchmarks + +The resolve benchmarks involve downloading the index and benchmarking against some real-world and artificial workspaces located in the [`workspaces`](workspaces) directory. @@ -21,7 +37,7 @@ faster. You can (and probably should) specify individual benchmarks to run to narrow it down to a more reasonable set, for example: ```sh -cargo bench -- resolve_ws/rust +cargo bench -p benchsuite --bench resolve -- resolve_ws/rust ``` This will only download what's necessary for the rust-lang/rust workspace @@ -29,7 +45,24 @@ This will only download what's necessary for the rust-lang/rust workspace about a minute). To get a list of all the benchmarks, run: ```sh -cargo bench -- --list +cargo bench -p benchsuite --bench resolve -- --list +``` + +### Global cache tracker + +The `global_cache_tracker` benchmark tests saving data to the global cache +tracker database using samples of real-world data. This benchmark should run +relatively quickly. + +The real-world data is based on a capture of my personal development +environment which has accumulated a large cache. So it is somewhat arbitrary, +but hopefully representative of a challenging environment. Capturing of the +data is done with the `capture-last-use` binary, which you can run if you need +to rebuild the database. Just try to run on a system with a relatively full +cache in your cargo home directory. + +```sh +cargo bench -p benchsuite --bench global_cache_tracker ``` ## Viewing reports |