Skip to content

Commit 8872e70

Browse files
authored
Merge pull request #111 from wesleywiser/update_docs
Update the docs to use `cargo install` instead of manually compiling
2 parents ba0b079 + b70537d commit 8872e70

File tree

4 files changed

+20
-15
lines changed

4 files changed

+20
-15
lines changed

crox/Readme.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ $ cargo rustc -- -Z self-profile
1616
2. Run `crox` on the output file:
1717

1818
```
19-
$ /path/to/crox pid-{pid}
19+
$ # Install crox if you haven't done so yet.
20+
$ cargo install --git https://github.com/rust-lang/measureme crox
21+
22+
$ crox {crate name}-{pid}
2023
```
2124

2225
3. Open Chrome

flamegraph/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,17 @@ flamegraph is a tool to produce [Flame Graph](https://github.com/brendangregg/Fl
55
## Example
66

77
```bash
8+
# Install flamegraph if you haven't done so yet.
9+
10+
$ cargo install --git https://github.com/rust-lang/measureme flamegraph
11+
812
$ git clone https://github.com/rust-lang/regex.git
913

1014
$ cd regex
1115

1216
$ cargo rustc -- -Z self-profile
1317

14-
$ flamegraph pid-{pid}
18+
$ flamegraph regex-{pid}
1519

1620
$ open rustc.svg
1721
```

stack_collapse/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,17 @@ stack-collapse is a tool to produce [Flame Graph](https://github.com/brendangreg
55
## Example
66

77
```bash
8+
$ # Install stack_collapse if you haven't done so yet.
9+
10+
$ cargo install --git https://github.com/rust-lang/measureme stack-collapse
11+
812
$ git clone https://github.com/rust-lang/regex.git
913

1014
$ cd regex
1115

1216
$ cargo rustc -- -Z self-profile
1317

14-
$ stack-collapse pid-{pid}
18+
$ stack-collapse regex-{pid}
1519

1620
$ ../path/to/FlameGraph/flamegraph.pl out.stacks_folded > rustc.svg
1721

summarize/Readme.md

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,12 @@ Summarize is a tool to produce a human readable summary of `measureme` profiling
44

55
## Installing summarize
66

7-
To use this tool you will first want to build it. To do this follow the steps
8-
below:
7+
To use this tool you will first want to install it:
98

109
```bash
11-
$ git clone https://github.com/rust-lang/measureme.git
12-
$ cd measureme/summarize
13-
$ cargo +nightly build --release
10+
$ cargo install --git https://github.com/rust-lang/measureme summarize
1411
```
1512

16-
This will compile the `summarize` binary which we will need later. It will be located in
17-
the `measureme/target/release` folder (ie. not in the `summarize` folder).
18-
1913
## Profiling the nightly compiler
2014

2115
To profile the nightly compiler first ensure that you have a recent nightly compiler by
@@ -39,11 +33,11 @@ have three files in your directory named `pid-{pid}.events`, `pid-{pid}.string_d
3933
`pid-{pid}.string_index`, which contain the profiler data. (If you just got a
4034
`regex.profile_events.json` file instead, your compiler is too old.)
4135

42-
You can now use the `summarize` tool we compiled in the previous section to view the
36+
You can now use the `summarize` tool we installed in the previous section to view the
4337
contents of these files:
4438

4539
```bash
46-
$ /path/to/measureme/target/release/summarize summarize id-{pid}
40+
$ summarize summarize id-{pid}
4741
+------------------------+-----------+-----------------+------------+------------+--------------+-----------------------+
4842
| Item | Self time | % of total time | Item count | Cache hits | Blocked time | Incremental load time |
4943
+------------------------+-----------+-----------------+------------+------------+--------------+-----------------------+
@@ -98,7 +92,7 @@ as before: (with regex as example)
9892
$ git clone https://github.com/rust-lang/regex.git
9993
$ cd regex
10094
$ cargo +mytoolchain rustc -- -Z self-profile
101-
$ /path/to/measureme/target/release/summarize summarize pid-{pid}
95+
$ summarize summarize pid-{pid}
10296
+------------------------+-----------+-----------------+------------+------------+--------------+-----------------------+
10397
| Item | Self time | % of total time | Item count | Cache hits | Blocked time | Incremental load time |
10498
+------------------------+-----------+-----------------+------------+------------+--------------+-----------------------+
@@ -152,7 +146,7 @@ The `diff` sub command allows you to compare the performance of two different pr
152146
The output is a table like that of the `summarize` sub command but it instead shows the differences in each metric.
153147

154148
```bash
155-
$ /path/to/measureme/target/release/summarize diff base-profile changed-profile
149+
$ summarize diff base-profile changed-profile
156150
+---------------------------+--------------+------------+------------+--------------+-----------------------+
157151
| Item | Self Time | Item count | Cache hits | Blocked time | Incremental load time |
158152
+---------------------------+--------------+------------+------------+--------------+-----------------------+

0 commit comments

Comments
 (0)