@@ -62,9 +62,35 @@ do that, the first step is to clone
62
62
63
63
[ rustc-perf-gh ] : https://github.com/rust-lang-nursery/rustc-perf
64
64
65
- This repo contains a bunch of stuff, but the sources for the tests are
66
- found in [ the ` collector/benchmarks ` directory] [ dir ] . So let's go into
67
- the directory of a specific test; we'll use ` clap-rs ` as an example:
65
+ #### Doing it the easy way
66
+
67
+ Once you've cloned the repo, you can use the ` collector ` executable to
68
+ do profiling for you! You can find
69
+ [ instructions in the rustc-perf readme] [ rustc-perf-readme ] .
70
+
71
+ [ rustc-perf-readme ] : https://github.com/rust-lang-nursery/rustc-perf/blob/master/collector/README.md#profiling
72
+
73
+ For example, to measure the clap-rs test, you might do:
74
+
75
+ ```
76
+ > ./target/release/collector \
77
+ --output-repo /path/to/place/output \
78
+ profile perf-record
79
+ --rustc /path/to/rustc/executable/from/your/build/directory
80
+ --cargo `which cargo`
81
+ --filter clap-rs
82
+ --builds Check
83
+ ```
84
+
85
+ You can also use that same command to use cachegrind or other profiling tools.
86
+
87
+ #### Doing it the hard way
88
+
89
+ If you prefer to run things manually, that is also possible. You first
90
+ need to find the source for the test you want. Sources for the tests
91
+ are found in [ the ` collector/benchmarks ` directory] [ dir ] . So let's go
92
+ into the directory of a specific test; we'll use ` clap-rs ` as an
93
+ example:
68
94
69
95
[ dir ] : https://github.com/rust-lang-nursery/rustc-perf/tree/master/collector/benchmarks
70
96
0 commit comments