aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-02-17 20:10:19 +0000
committerGitHub <[email protected]>2020-02-17 20:10:19 +0000
commit9053003e3b298b38f6029b860efc5baed1996385 (patch)
tree7ab4c825c2919090de7a0570ba9da0790c004de2
parent1b73abd1c3c9185f4a1f62c5e657e07daf3d4774 (diff)
parentb6b8fd9525099a54fa2065d55609808636bb5673 (diff)
Merge #3202
3202: Fix RA_PROF and replace ra_cli mentions r=matklad a=lnicola Co-authored-by: LaurenČ›iu Nicola <[email protected]>
-rw-r--r--crates/ra_lsp_server/src/args.rs14
-rw-r--r--crates/ra_prof/src/lib.rs4
-rw-r--r--docs/dev/README.md12
-rw-r--r--docs/dev/architecture.md4
4 files changed, 15 insertions, 19 deletions
diff --git a/crates/ra_lsp_server/src/args.rs b/crates/ra_lsp_server/src/args.rs
index 89e2139ce..3890fe13a 100644
--- a/crates/ra_lsp_server/src/args.rs
+++ b/crates/ra_lsp_server/src/args.rs
@@ -74,7 +74,7 @@ impl Args {
74ra-cli-parse 74ra-cli-parse
75 75
76USAGE: 76USAGE:
77 ra_cli parse [FLAGS] 77 ra_lsp_server parse [FLAGS]
78 78
79FLAGS: 79FLAGS:
80 -h, --help Prints help inforamtion 80 -h, --help Prints help inforamtion
@@ -94,7 +94,7 @@ FLAGS:
94ra-cli-symbols 94ra-cli-symbols
95 95
96USAGE: 96USAGE:
97 ra_cli highlight [FLAGS] 97 ra_lsp_server highlight [FLAGS]
98 98
99FLAGS: 99FLAGS:
100 -h, --help Prints help inforamtion" 100 -h, --help Prints help inforamtion"
@@ -113,7 +113,7 @@ FLAGS:
113ra-cli-highlight 113ra-cli-highlight
114 114
115USAGE: 115USAGE:
116 ra_cli highlight [FLAGS] 116 ra_lsp_server highlight [FLAGS]
117 117
118FLAGS: 118FLAGS:
119 -h, --help Prints help information 119 -h, --help Prints help information
@@ -133,7 +133,7 @@ FLAGS:
133ra-cli-analysis-stats 133ra-cli-analysis-stats
134 134
135USAGE: 135USAGE:
136 ra_cli analysis-stats [FLAGS] [OPTIONS] [PATH] 136 ra_lsp_server analysis-stats [FLAGS] [OPTIONS] [PATH]
137 137
138FLAGS: 138FLAGS:
139 -h, --help Prints help information 139 -h, --help Prints help information
@@ -168,10 +168,10 @@ ARGS:
168 if matches.contains(["-h", "--help"]) { 168 if matches.contains(["-h", "--help"]) {
169 eprintln!( 169 eprintln!(
170 "\ 170 "\
171ra_cli-analysis-bench 171ra_lsp_server-analysis-bench
172 172
173USAGE: 173USAGE:
174 ra_cli analysis-bench [FLAGS] [OPTIONS] [PATH] 174 ra_lsp_server analysis-bench [FLAGS] [OPTIONS] [PATH]
175 175
176FLAGS: 176FLAGS:
177 -h, --help Prints help information 177 -h, --help Prints help information
@@ -207,7 +207,7 @@ ARGS:
207ra-cli 207ra-cli
208 208
209USAGE: 209USAGE:
210 ra_cli <SUBCOMMAND> 210 ra_lsp_server <SUBCOMMAND>
211 211
212FLAGS: 212FLAGS:
213 -h, --help Prints help information 213 -h, --help Prints help information
diff --git a/crates/ra_prof/src/lib.rs b/crates/ra_prof/src/lib.rs
index c0bfbc2ee..7ff8db58a 100644
--- a/crates/ra_prof/src/lib.rs
+++ b/crates/ra_prof/src/lib.rs
@@ -351,13 +351,13 @@ impl Drop for Scope {
351/// 2. Build with `cpu_profiler` feature. 351/// 2. Build with `cpu_profiler` feature.
352/// 3. Tun the code, the *raw* output would be in the `./out.profile` file. 352/// 3. Tun the code, the *raw* output would be in the `./out.profile` file.
353/// 4. Install pprof for visualization (https://github.com/google/pprof). 353/// 4. Install pprof for visualization (https://github.com/google/pprof).
354/// 5. Use something like `pprof -svg target/release/ra_cli ./out.profile` to see the results. 354/// 5. Use something like `pprof -svg target/release/ra_lsp_server ./out.profile` to see the results.
355/// 355///
356/// For example, here's how I run profiling on NixOS: 356/// For example, here's how I run profiling on NixOS:
357/// 357///
358/// ```bash 358/// ```bash
359/// $ nix-shell -p gperftools --run \ 359/// $ nix-shell -p gperftools --run \
360/// 'cargo run --release -p ra_cli -- parse < ~/projects/rustbench/parser.rs > /dev/null' 360/// 'cargo run --release -p ra_lsp_server -- parse < ~/projects/rustbench/parser.rs > /dev/null'
361/// ``` 361/// ```
362#[derive(Debug)] 362#[derive(Debug)]
363pub struct CpuProfiler { 363pub struct CpuProfiler {
diff --git a/docs/dev/README.md b/docs/dev/README.md
index 991deaf90..ba24524f2 100644
--- a/docs/dev/README.md
+++ b/docs/dev/README.md
@@ -113,7 +113,7 @@ communication, and `print!` would break it.
113If I need to fix something simultaneously in the server and in the client, I 113If I need to fix something simultaneously in the server and in the client, I
114feel even more sad. I don't have a specific workflow for this case. 114feel even more sad. I don't have a specific workflow for this case.
115 115
116Additionally, I use `cargo run --release -p ra_cli -- analysis-stats 116Additionally, I use `cargo run --release -p ra_lsp_server -- analysis-stats
117path/to/some/rust/crate` to run a batch analysis. This is primarily useful for 117path/to/some/rust/crate` to run a batch analysis. This is primarily useful for
118performance optimizations, or for bug minimization. 118performance optimizations, or for bug minimization.
119 119
@@ -157,7 +157,7 @@ There's also two VS Code commands which might be of interest:
157 157
158# Profiling 158# Profiling
159 159
160We have a built-in hierarchical profiler, you can enable it by using `RA_PROF` env-var: 160We have a built-in hierarchical profiler, you can enable it by using `RA_PROFILE` env-var:
161 161
162``` 162```
163RA_PROFILE=* // dump everything 163RA_PROFILE=* // dump everything
@@ -165,17 +165,17 @@ RA_PROFILE=foo|bar|baz // enabled only selected entries
165RA_PROFILE=*@3>10 // dump everything, up to depth 3, if it takes more than 10 ms 165RA_PROFILE=*@3>10 // dump everything, up to depth 3, if it takes more than 10 ms
166``` 166```
167 167
168In particular, I have `export RA_PROFILE='*>10' in my shell profile. 168In particular, I have `export RA_PROFILE='*>10'` in my shell profile.
169 169
170To measure time for from-scratch analysis, use something like this: 170To measure time for from-scratch analysis, use something like this:
171 171
172``` 172```
173$ cargo run --release -p ra_cli -- analysis-stats ../chalk/ 173$ cargo run --release -p ra_lsp_server -- analysis-stats ../chalk/
174``` 174```
175 175
176For measuring time of incremental analysis, use either of these: 176For measuring time of incremental analysis, use either of these:
177 177
178``` 178```
179$ cargo run --release -p ra_cli -- analysis-bench ../chalk/ --highlight ../chalk/chalk-engine/src/logic.rs 179$ cargo run --release -p ra_lsp_server -- analysis-bench ../chalk/ --highlight ../chalk/chalk-engine/src/logic.rs
180$ cargo run --release -p ra_cli -- analysis-bench ../chalk/ --complete ../chalk/chalk-engine/src/logic.rs:94:0 180$ cargo run --release -p ra_lsp_server -- analysis-bench ../chalk/ --complete ../chalk/chalk-engine/src/logic.rs:94:0
181``` 181```
diff --git a/docs/dev/architecture.md b/docs/dev/architecture.md
index 9675ed0b6..41c3909f7 100644
--- a/docs/dev/architecture.md
+++ b/docs/dev/architecture.md
@@ -147,10 +147,6 @@ different from data on disk. This is more or less the single really
147platform-dependent component, so it lives in a separate repository and has an 147platform-dependent component, so it lives in a separate repository and has an
148extensive cross-platform CI testing. 148extensive cross-platform CI testing.
149 149
150### `crates/ra_cli`
151
152A CLI interface to rust-analyzer, mainly for testing.
153
154## Testing Infrastructure 150## Testing Infrastructure
155 151
156Rust Analyzer has three interesting [systems 152Rust Analyzer has three interesting [systems