Skip to content

Commit fb59bf5

Browse files
nikomatsakismark-i-m
authored andcommitted
be consistent about bash snippets
1 parent 4e5ab2a commit fb59bf5

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/profiling/with_perf.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ the directory of a specific test; we'll use `clap-rs` as an example:
6868
[dir]: https://github.com/rust-lang-nursery/rustc-perf/tree/master/collector/benchmarks
6969

7070
```bash
71-
cd collector/benchmarks/clap-rs
71+
> cd collector/benchmarks/clap-rs
7272
```
7373

7474
In this case, let's say we want to profile the `cargo check`
@@ -77,17 +77,17 @@ build the dependencies:
7777

7878
```bash
7979
# Setup: first clean out any old results and build the dependencies:
80-
cargo +rust-prof clean
81-
CARGO_INCREMENTAL=0 cargo +rust-prof check
80+
> cargo +rust-prof clean
81+
> CARGO_INCREMENTAL=0 cargo +rust-prof check
8282
```
8383

8484
Next: we want record the execution time for *just* the clap-rs crate,
8585
running cargo check. I tend to use `cargo rustc` for this, since it
8686
also allows me to add explicit flags, which we'll do later on.
8787

8888
```bash
89-
touch src/lib.rs
90-
CARGO_INCREMENTAL=0 perf record -F99 --call-graph dwarf cargo rustc --profile check --lib
89+
> touch src/lib.rs
90+
> CARGO_INCREMENTAL=0 perf record -F99 --call-graph dwarf cargo rustc --profile check --lib
9191
```
9292

9393
Note that final command: it's a doozy! It uses the `cargo rustc`
@@ -117,8 +117,8 @@ If you want to profile an NLL run, you can just pass extra options to
117117
the `cargo rustc` command, like so:
118118

119119
```bash
120-
touch src/lib.rs
121-
CARGO_INCREMENTAL=0 perf record -F99 --call-graph dwarf cargo rustc --profile check --lib — -Zborrowck=mir
120+
> touch src/lib.rs
121+
> CARGO_INCREMENTAL=0 perf record -F99 --call-graph dwarf cargo rustc --profile check --lib — -Zborrowck=mir
122122
```
123123

124124
[pf]: https://github.com/nikomatsakis/perf-focus

0 commit comments

Comments
 (0)