From 6f5ac06b47b040936c6e0a1fbac9cdba13e26197 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Sun, 4 Aug 2019 13:49:13 +0300 Subject: Display the parsing time in ra_cli analysis-stats --- crates/ra_cli/src/analysis_stats.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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>) - println!("Total modules found: {}", visited_modules.len()); println!("Total declarations: {}", num_decls); println!("Total functions: {}", funcs.len()); + println!("Parsing: {:?}, {}", analysis_time.elapsed(), ra_prof::memory_usage()); + + let inference_time = Instant::now(); let bar = indicatif::ProgressBar::with_draw_target( funcs.len() as u64, indicatif::ProgressDrawTarget::stderr_nohz(), @@ -112,7 +115,8 @@ pub fn run(verbose: bool, memory_usage: bool, path: &Path, only: Option<&str>) - num_exprs_partially_unknown, (num_exprs_partially_unknown * 100 / num_exprs) ); - println!("Analysis: {:?}, {}", analysis_time.elapsed(), ra_prof::memory_usage()); + println!("Inference: {:?}, {}", inference_time.elapsed(), ra_prof::memory_usage()); + println!("Total: {:?}, {}", analysis_time.elapsed(), ra_prof::memory_usage()); if memory_usage { drop(db); -- cgit v1.2.3