add some profiling calls

This commit is contained in:
Aleksey Kladov 2019-10-24 10:37:20 +03:00
parent 778f50b147
commit ac1b7b07e7
3 changed files with 10 additions and 0 deletions

View file

@ -2,6 +2,7 @@
use hir::{Either, FromSource, Module, ModuleSource, Path, PathResolution, Source, SourceAnalyzer};
use ra_db::FileId;
use ra_prof::profile;
use ra_syntax::{ast, match_ast, AstNode, AstPtr};
use test_utils::tested_by;
@ -16,6 +17,7 @@ pub(crate) fn classify_name(
file_id: FileId,
name: &ast::Name,
) -> Option<NameDefinition> {
let _p = profile("classify_name");
let parent = name.syntax().parent()?;
let file_id = file_id.into();
@ -108,6 +110,8 @@ pub(crate) fn classify_name_ref(
) -> Option<NameDefinition> {
use PathResolution::*;
let _p = profile("classify_name_ref");
let parent = name_ref.syntax().parent()?;
let analyzer = SourceAnalyzer::new(db, file_id, name_ref.syntax(), None);