diff options
Diffstat (limited to 'crates/ra_cli')
-rw-r--r-- | crates/ra_cli/Cargo.toml | 1 | ||||
-rw-r--r-- | crates/ra_cli/src/main.rs | 7 |
2 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_cli/Cargo.toml b/crates/ra_cli/Cargo.toml index 467628236..328b2436f 100644 --- a/crates/ra_cli/Cargo.toml +++ b/crates/ra_cli/Cargo.toml | |||
@@ -18,3 +18,4 @@ tools = { path = "../tools" } | |||
18 | ra_batch = { path = "../ra_batch" } | 18 | ra_batch = { path = "../ra_batch" } |
19 | ra_hir = { path = "../ra_hir" } | 19 | ra_hir = { path = "../ra_hir" } |
20 | ra_db = { path = "../ra_db" } | 20 | ra_db = { path = "../ra_db" } |
21 | ra_prof = { path = "../ra_prof" } | ||
diff --git a/crates/ra_cli/src/main.rs b/crates/ra_cli/src/main.rs index 1f2750d89..45555be6e 100644 --- a/crates/ra_cli/src/main.rs +++ b/crates/ra_cli/src/main.rs | |||
@@ -1,12 +1,13 @@ | |||
1 | mod analysis_stats; | 1 | mod analysis_stats; |
2 | 2 | ||
3 | use std::{fs, io::Read, path::Path, time::Instant}; | 3 | use std::{fs, io::Read, path::Path}; |
4 | 4 | ||
5 | use clap::{App, Arg, SubCommand}; | 5 | use clap::{App, Arg, SubCommand}; |
6 | use ra_ide_api::file_structure; | 6 | use ra_ide_api::file_structure; |
7 | use ra_syntax::{SourceFile, TreeArc, AstNode}; | 7 | use ra_syntax::{SourceFile, TreeArc, AstNode}; |
8 | use tools::collect_tests; | 8 | use tools::collect_tests; |
9 | use flexi_logger::Logger; | 9 | use flexi_logger::Logger; |
10 | use ra_prof::profile; | ||
10 | 11 | ||
11 | type Result<T> = ::std::result::Result<T, failure::Error>; | 12 | type Result<T> = ::std::result::Result<T, failure::Error>; |
12 | 13 | ||
@@ -27,13 +28,11 @@ fn main() -> Result<()> { | |||
27 | .get_matches(); | 28 | .get_matches(); |
28 | match matches.subcommand() { | 29 | match matches.subcommand() { |
29 | ("parse", Some(matches)) => { | 30 | ("parse", Some(matches)) => { |
30 | let start = Instant::now(); | 31 | let _p = profile("parsing"); |
31 | let file = file()?; | 32 | let file = file()?; |
32 | let elapsed = start.elapsed(); | ||
33 | if !matches.is_present("no-dump") { | 33 | if !matches.is_present("no-dump") { |
34 | println!("{}", file.syntax().debug_dump()); | 34 | println!("{}", file.syntax().debug_dump()); |
35 | } | 35 | } |
36 | eprintln!("parsing: {:?}", elapsed); | ||
37 | ::std::mem::forget(file); | 36 | ::std::mem::forget(file); |
38 | } | 37 | } |
39 | ("symbols", _) => { | 38 | ("symbols", _) => { |