@@ -68,7 +68,7 @@ the directory of a specific test; we'll use `clap-rs` as an example:
68
68
[ dir ] : https://github.com/rust-lang-nursery/rustc-perf/tree/master/collector/benchmarks
69
69
70
70
``` bash
71
- cd collector/benchmarks/clap-rs
71
+ > cd collector/benchmarks/clap-rs
72
72
```
73
73
74
74
In this case, let's say we want to profile the ` cargo check `
@@ -77,17 +77,17 @@ build the dependencies:
77
77
78
78
``` bash
79
79
# 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
82
82
```
83
83
84
84
Next: we want record the execution time for * just* the clap-rs crate,
85
85
running cargo check. I tend to use ` cargo rustc ` for this, since it
86
86
also allows me to add explicit flags, which we'll do later on.
87
87
88
88
``` 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
91
91
```
92
92
93
93
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
117
117
the ` cargo rustc ` command, like so:
118
118
119
119
``` 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
122
122
```
123
123
124
124
[ pf ] : https://github.com/nikomatsakis/perf-focus
0 commit comments