Skip to content

Commit 83fbda3

Browse files
committed
Readme tweaks, fixes for new contributors
1 parent 1dfaf56 commit 83fbda3

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

README.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,21 +50,29 @@ own rustup installation, crate mirrors, etc.
5050
```
5151
cd docker && docker build . && cd .. # This takes a while
5252
cargo run -- prepare-local
53-
cargo run -- define-ex stable beta
53+
cargo run -- define-ex --crate-select=demo stable beta
5454
cargo run -- prepare-ex
5555
cargo run -- run
5656
cargo run -- gen-report work/ex/default/
5757
```
5858

5959
This will output a report to `./work/ex/default/index.html`.
6060

61-
Here's what each of these steps does:
61+
Delete things with
62+
```
63+
cargo run -- delete-all-target-dirs
64+
cargo run -- delete-all-results
65+
cargo run -- delete-ex
66+
```
67+
Each command except `prepare-local` optionally takes an `--ex` argument
68+
to identify the experiment being referred to. If not supplied, this
69+
defaults to `default`. Here's what each of the steps does:
6270

6371
* `prepare-local` - sets up the stable toolchain for internal use,
6472
builds the docker container, builds lists of crates. This needs to
6573
be rerun periodically, but not between every experiment.
6674

67-
* `define-ex` - defines a new experiment, by default named 'default',
75+
* `define-ex` - defines a new experiment
6876
performing a build-test experiment on the 'demo' set of crates.
6977

7078
* `prepare-ex` - fetches repos from github and captures their commit
@@ -77,6 +85,9 @@ Here's what each of these steps does:
7785
* `gen-report` - summarize the experiment results to
7886
work/ex/default/index.html
7987

88+
* `delete-all-target-dirs`/`delete-all-results`/`delete-ex` - clean up
89+
everything relating to this experiment
90+
8091
### Custom toolchains
8192

8293
Toolchains for rust PRs that have been built by by asking bors to try a PR can
@@ -195,7 +206,7 @@ the sheet that does not have a status of 'Complete' or 'Failed'.
195206
and `BETA_DATE` is the date from
196207
`curl -sSL static.rust-lang.org/dist/channel-rust-beta.toml | grep '^date ='` (it is *not*
197208
necessarily the same date as retrieved in the `BETA_VERSION` command).
198-
- Run `cargo run --release -- define-ex --ex EX_NAME EX_START EX_END --crate-select=full`.
209+
- Run `cargo run --release -- define-ex --crate-select=full --ex EX_NAME EX_START EX_END`.
199210
This will complete in a few seconds.
200211
- Run `cargo run --release -- prepare-ex --ex EX_NAME`.
201212
- Change status to 'Preparing'.

src/report/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,9 @@ fn write_logs<W: ReportWriter>(ex: &ex::Experiment, dest: &W) -> Result<()> {
8787
let db = FileDB::for_experiment(ex);
8888
let crates = ex.crates()?;
8989
let num_crates = crates.len();
90+
let progress_every = (num_crates / PROGRESS_FRACTION) + 1;
9091
for (i, krate) in crates.into_iter().enumerate() {
91-
if i % (num_crates / PROGRESS_FRACTION) == 0 {
92+
if i % progress_every == 0 {
9293
info!("wrote logs for {}/{} crates", i, num_crates)
9394
}
9495
for tc in &ex.toolchains {

0 commit comments

Comments
 (0)