Skip to content

Commit e76fee6

Browse files
committed
Change --skip-self-profile to --self-profile.
It makes more sense that way, especially in the docs.
1 parent 2ce8476 commit e76fee6

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

ci/check-benchmarks.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ git clone https://github.com/rust-lang-nursery/rustc-timing.git;
99
cargo build -p collector;
1010
RUST_BACKTRACE=1 RUST_LOG=collector=trace,rust_sysroot=debug \
1111
cargo run -p collector --bin collector -- \
12-
--skip-self-profile \
1312
--output-repo rustc-timing \
1413
--exclude servo,cargo,crates.io,packed-simd,sentry-cli,tuple-stress test_benchmarks;
1514
code=$?

collector/README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ depending on the speed of your machine.
9494

9595
The following options, if present, must appear before `bench_local` in the
9696
command.
97+
- `--self-profile` can be used to do self-profiling, which requires the
98+
`measureme` tool.
9799
- `--filter $STR` can be used to run a subset of the benchmarks. `$STR` is a
98100
substring of the name of the benchmark(s) you wish to run.
99101
- `--exclude $STR` is the inverse of `--filter`. `$STR` is a substring of the
@@ -196,7 +198,15 @@ might be optimized.
196198

197199
### Profiling local builds
198200

199-
To profile local builds:
201+
To self-profile a local build:
202+
```
203+
RUST_LOG=info ./target/release/collector --output-repo $OUTPUT_DIR --self-profile \
204+
bench_local $PROFILER --rustc $RUSTC --cargo $CARGO $ID
205+
```
206+
207+
Then view the results the same way as for the `bench_local` subcommand.
208+
209+
To profile a local build with a different profiler:
200210
```
201211
RUST_LOG=info ./target/release/collector --output-repo $OUTPUT_DIR \
202212
profile $PROFILER --rustc $RUSTC --cargo $CARGO $ID

collector/src/bin/rustc-perf-collector/main.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ fn bench_commit(
289289
assert!(
290290
has_measureme,
291291
"needs `summarize` in PATH for self profile.\n\
292-
Pass --skip-self-profile` to opt out"
292+
Omit --self-profile` to opt out"
293293
);
294294
}
295295

@@ -298,7 +298,6 @@ fn bench_commit(
298298
continue;
299299
}
300300

301-
// Only collect self-profile if we have summarize in the path
302301
let mut processor = execute::MeasureProcessor::new(collect_self_profile);
303302
let result =
304303
benchmark.measure(&mut processor, build_kinds, run_kinds, compiler, iterations);
@@ -398,7 +397,7 @@ fn main_result() -> anyhow::Result<i32> {
398397
(@arg exclude: --exclude +takes_value "Ignore all benchmarks that contain this")
399398
(@arg sync_git: --("sync-git") "Synchronize repository with remote")
400399
(@arg output_repo: --("output-repo") +required +takes_value "Output repository/directory")
401-
(@arg skip_self_profile: --("skip-self-profile") "Skip self-profile")
400+
(@arg self_profile: --("self-profile") "Collect self-profile")
402401

403402
(@subcommand bench_commit =>
404403
(about: "benchmark a bors merge from AWS")
@@ -456,7 +455,7 @@ fn main_result() -> anyhow::Result<i32> {
456455
let exclude = matches.value_of("exclude");
457456
let benchmarks = get_benchmarks(&benchmark_dir, filter, exclude)?;
458457
let use_remote = matches.is_present("sync_git");
459-
let collect_self_profile = !matches.is_present("skip_self_profile");
458+
let collect_self_profile = matches.is_present("self_profile");
460459

461460
let get_out_dir = || {
462461
let path = PathBuf::from(matches.value_of_os("output_repo").unwrap());

0 commit comments

Comments
 (0)