Skip to content

Commit 24f7028

Browse files
Add profiling
1 parent d5c3808 commit 24f7028

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

crates/ra_assists/src/handlers/auto_import.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ use hir::{
1313
AssocContainerId, AssocItem, Crate, Function, ModPath, Module, ModuleDef, PathResolution,
1414
SourceAnalyzer, Trait, Type,
1515
};
16+
use ra_prof::profile;
1617
use rustc_hash::FxHashSet;
1718
use std::collections::BTreeSet;
1819

@@ -123,6 +124,7 @@ impl AutoImportAssets {
123124
db: &RootDatabase,
124125
module_with_name_to_import: Module,
125126
) -> BTreeSet<ModPath> {
127+
let _p = profile("auto_import::search_for_imports");
126128
ImportsLocator::new(db)
127129
.find_imports(&self.get_search_query())
128130
.into_iter()
@@ -207,6 +209,7 @@ impl AutoImportAssets {
207209
called_function: Function,
208210
root_crate: Crate,
209211
) -> FxHashSet<Trait> {
212+
let _p = profile("auto_import::get_trait_candidates");
210213
root_crate
211214
.dependencies(db)
212215
.into_iter()

0 commit comments

Comments
 (0)