aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorLaurenČ›iu Nicola <[email protected]>2019-08-04 11:49:13 +0100
committerLaurenČ›iu Nicola <[email protected]>2019-08-05 14:53:54 +0100
commit6f5ac06b47b040936c6e0a1fbac9cdba13e26197 (patch)
tree35b204a4604cbbf7d23faed71518f1206c8174ba /crates
parenta490f80a9c49380c5088b704047bb20b76c06e4d (diff)
Display the parsing time in ra_cli analysis-stats
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_cli/src/analysis_stats.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/ra_cli/src/analysis_stats.rs b/crates/ra_cli/src/analysis_stats.rs
index 403aab352..4fe3cb43a 100644
--- a/crates/ra_cli/src/analysis_stats.rs
+++ b/crates/ra_cli/src/analysis_stats.rs
@@ -52,6 +52,9 @@ pub fn run(verbose: bool, memory_usage: bool, path: &Path, only: Option<&str>) -
52 println!("Total modules found: {}", visited_modules.len()); 52 println!("Total modules found: {}", visited_modules.len());
53 println!("Total declarations: {}", num_decls); 53 println!("Total declarations: {}", num_decls);
54 println!("Total functions: {}", funcs.len()); 54 println!("Total functions: {}", funcs.len());
55 println!("Parsing: {:?}, {}", analysis_time.elapsed(), ra_prof::memory_usage());
56
57 let inference_time = Instant::now();
55 let bar = indicatif::ProgressBar::with_draw_target( 58 let bar = indicatif::ProgressBar::with_draw_target(
56 funcs.len() as u64, 59 funcs.len() as u64,
57 indicatif::ProgressDrawTarget::stderr_nohz(), 60 indicatif::ProgressDrawTarget::stderr_nohz(),
@@ -112,7 +115,8 @@ pub fn run(verbose: bool, memory_usage: bool, path: &Path, only: Option<&str>) -
112 num_exprs_partially_unknown, 115 num_exprs_partially_unknown,
113 (num_exprs_partially_unknown * 100 / num_exprs) 116 (num_exprs_partially_unknown * 100 / num_exprs)
114 ); 117 );
115 println!("Analysis: {:?}, {}", analysis_time.elapsed(), ra_prof::memory_usage()); 118 println!("Inference: {:?}, {}", inference_time.elapsed(), ra_prof::memory_usage());
119 println!("Total: {:?}, {}", analysis_time.elapsed(), ra_prof::memory_usage());
116 120
117 if memory_usage { 121 if memory_usage {
118 drop(db); 122 drop(db);