mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
add some profiling calls
This commit is contained in:
parent
778f50b147
commit
ac1b7b07e7
3 changed files with 10 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue