|
2 | 2 |
|
3 | 3 | Implements running benchmarks given a bors commit hash.
|
4 | 4 |
|
5 |
| -## Setup |
6 |
| - |
7 |
| -Utilizes native-tls crate through reqwest to allow running on most platforms. If running on Ubuntu, |
8 |
| -please install openssl (libssl-dev). |
9 |
| - |
10 |
| -A file, `last-commit-sha`, should be in the current directory when running the script and it should |
11 |
| -contain a single line, containing the SHA1 of the bors merge commit in the rust-lang/rust repository |
12 |
| -from which to start running. The script will automatically update it as it completes each commit |
13 |
| -since it. If starting from scratch, 83c2d95238e3545e7ae9af4873c48b1e3651c164 may be a good option |
14 |
| -(see below, this is the first commit we support). |
15 |
| - |
16 | 5 | ## How to run
|
17 | 6 |
|
18 | 7 | ```
|
19 |
| -RUST_LOG=info GH_API_TOKEN=<token> cargo run -- --benchmarks ./benchmarks process $RUSTC_TIMING |
| 8 | +# From repository root: |
| 9 | +cargo build -p collector --release |
| 10 | +./target/release/collector --benchmarks collector/benchmarks --output-repo $RUSTC_TIMING process |
20 | 11 | ```
|
21 | 12 |
|
22 |
| -GH_API_TOKEN should be a GitHub token, which is only used to reduce API rate limits, so should need |
23 |
| -extremely minimal rights (if any). |
24 |
| - |
25 |
| -$RUSTC_TIMING should point to a clone of the `https://github.com/rust-lang-nursery/rustc-timing` repository, with push access. |
| 13 | +$RUSTC_TIMING should point to a clone of the `https://github.com/rust-lang-nursery/rustc-timing` |
| 14 | +repository. Optionally, `--sync-git` can be passed to make the collector sync with the remote repo |
| 15 | +before and after comitting. |
26 | 16 |
|
27 | 17 | ## How it works
|
28 | 18 |
|
29 | 19 | We download the artifacts (rustc, rust-std, cargo) produced by CI and properly unarchive them into
|
30 | 20 | the correct directories to allow cargo and rustc to function. Currently only
|
31 | 21 | x86_64-unknown-linux-gnu is supported, but the system should trivially expand to other platforms
|
32 |
| -(e.g., Windows) should we want it, though generation and downloading of artifacts becomes necessary |
33 |
| -at that point. |
| 22 | +(e.g., Windows), though generation and downloading of artifacts becomes necessary at that point. |
34 | 23 |
|
35 |
| -## Limitations |
| 24 | +`perf` is used to gather most of the data. |
36 | 25 |
|
37 |
| -Will only work for commits that have builds on s3://rust-lang-ci/rustc-builds: these merged after #38748 (bors sha: 927c55d86b0be44337f37cf5b0a76fb8ba86e06c). |
| 26 | +## Limitations |
38 | 27 |
|
39 |
| -Subpasses are currently ignored completely, since their naming differs between different runs. No |
40 |
| -serious investigation as to why this is has been conducted, so it is possible that they could be |
41 |
| -re-enabled after additional investigation and improvements. The differences in names between runs |
42 |
| -make the code which attempts to average passes across runs to (at least theoretically) produce more |
43 |
| -accurate data break, since it cannot find the same pass in all runs. |
| 28 | +Will only work for commits that have builds on s3://rust-lang-ci/rustc-builds: these merged after |
| 29 | +rust-lang/rust#38748 (bors sha: 927c55d86b0be44337f37cf5b0a76fb8ba86e06c). Additionally, try builds |
| 30 | +can also be tested, but the process is currently manual. |
0 commit comments