aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_cli/src/analysis_stats.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_cli/src/analysis_stats.rs')
-rw-r--r--crates/ra_cli/src/analysis_stats.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/crates/ra_cli/src/analysis_stats.rs b/crates/ra_cli/src/analysis_stats.rs
index 6d2dd34c6..d40f04391 100644
--- a/crates/ra_cli/src/analysis_stats.rs
+++ b/crates/ra_cli/src/analysis_stats.rs
@@ -2,19 +2,18 @@
2 2
3use std::{collections::HashSet, fmt::Write, path::Path, time::Instant}; 3use std::{collections::HashSet, fmt::Write, path::Path, time::Instant};
4 4
5use itertools::Itertools;
6use rand::{seq::SliceRandom, thread_rng};
7
8use hir::{ 5use hir::{
9 db::{DefDatabase, HirDatabase}, 6 db::{DefDatabase, HirDatabase},
10 AssocItem, Crate, HasSource, HirDisplay, ModuleDef, 7 AssocItem, Crate, HasSource, HirDisplay, ModuleDef,
11}; 8};
12use hir_def::FunctionId; 9use hir_def::FunctionId;
13use hir_ty::{Ty, TypeWalk}; 10use hir_ty::{Ty, TypeWalk};
11use itertools::Itertools;
14use ra_db::SourceDatabaseExt; 12use ra_db::SourceDatabaseExt;
15use ra_syntax::AstNode; 13use ra_syntax::AstNode;
14use rand::{seq::SliceRandom, thread_rng};
16 15
17use crate::{progress_report::ProgressReport, Result, Verbosity}; 16use crate::{load_cargo::load_cargo, progress_report::ProgressReport, Result, Verbosity};
18 17
19pub fn run( 18pub fn run(
20 verbosity: Verbosity, 19 verbosity: Verbosity,
@@ -25,7 +24,7 @@ pub fn run(
25 randomize: bool, 24 randomize: bool,
26) -> Result<()> { 25) -> Result<()> {
27 let db_load_time = Instant::now(); 26 let db_load_time = Instant::now();
28 let (mut host, roots) = ra_batch::load_cargo(path)?; 27 let (mut host, roots) = load_cargo(path)?;
29 let db = host.raw_database(); 28 let db = host.raw_database();
30 println!("Database loaded, {} roots, {:?}", roots.len(), db_load_time.elapsed()); 29 println!("Database loaded, {} roots, {:?}", roots.len(), db_load_time.elapsed());
31 let analysis_time = Instant::now(); 30 let analysis_time = Instant::now();