diff options
Diffstat (limited to 'crates/ra_cli/src/analysis_stats.rs')
-rw-r--r-- | crates/ra_cli/src/analysis_stats.rs | 9 |
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 | ||
3 | use std::{collections::HashSet, fmt::Write, path::Path, time::Instant}; | 3 | use std::{collections::HashSet, fmt::Write, path::Path, time::Instant}; |
4 | 4 | ||
5 | use itertools::Itertools; | ||
6 | use rand::{seq::SliceRandom, thread_rng}; | ||
7 | |||
8 | use hir::{ | 5 | use hir::{ |
9 | db::{DefDatabase, HirDatabase}, | 6 | db::{DefDatabase, HirDatabase}, |
10 | AssocItem, Crate, HasSource, HirDisplay, ModuleDef, | 7 | AssocItem, Crate, HasSource, HirDisplay, ModuleDef, |
11 | }; | 8 | }; |
12 | use hir_def::FunctionId; | 9 | use hir_def::FunctionId; |
13 | use hir_ty::{Ty, TypeWalk}; | 10 | use hir_ty::{Ty, TypeWalk}; |
11 | use itertools::Itertools; | ||
14 | use ra_db::SourceDatabaseExt; | 12 | use ra_db::SourceDatabaseExt; |
15 | use ra_syntax::AstNode; | 13 | use ra_syntax::AstNode; |
14 | use rand::{seq::SliceRandom, thread_rng}; | ||
16 | 15 | ||
17 | use crate::{progress_report::ProgressReport, Result, Verbosity}; | 16 | use crate::{load_cargo::load_cargo, progress_report::ProgressReport, Result, Verbosity}; |
18 | 17 | ||
19 | pub fn run( | 18 | pub 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(); |