Debian Codegraph @

third_party/rust/suggest/src/benchmarks/README.md

raw
1 # Suggest benchmarking code
2
3 Use `cargo suggest-bench` to run these benchmarks.
4
5 The main benchmarking code lives here, while the criterion integration code lives in the `benches/`
6 directory.
7
8 ## Benchmarks
9
10 ### ingest-[provider-type]
11
12 Time it takes to ingest all suggestions for a provider type on an empty database.
13 The benchmark downloads network resources in advance in order to exclude the network request time
14 from these measurements.
15
16 ### Benchmarks it would be nice to have
17
18 - Ingestion with synthetic data. This would isolate the benchmark from changes to the RS database.
19 - Fetching suggestions
20
21 ## cargo suggest-debug-ingestion-sizes
22
23 Run this to get row counts for all database tables. This can be very useful for improving
24 benchmarks, since targeting the tables with the largest number of rows will usually lead to the
25 largest improvements.
26
27 The command also prints out the size of all remote-settings attachments, which can be good to
28 optimize on its own since it represents the amount of data user's need to download.