mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
Record HirFileId's in profiler
This commit is contained in:
parent
1fbe21a545
commit
19586bc5c6
2 changed files with 2 additions and 2 deletions
|
@ -114,7 +114,7 @@ pub trait SourceDatabase: CheckCanceled + FileLoader + std::fmt::Debug {
|
|||
}
|
||||
|
||||
fn parse_query(db: &impl SourceDatabase, file_id: FileId) -> Parse<ast::SourceFile> {
|
||||
let _p = profile("parse_query");
|
||||
let _p = profile("parse_query").detail(|| format!("{:?}", file_id));
|
||||
let text = db.file_text(file_id);
|
||||
SourceFile::parse(&*text)
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ pub struct ItemTree {
|
|||
|
||||
impl ItemTree {
|
||||
pub fn item_tree_query(db: &dyn DefDatabase, file_id: HirFileId) -> Arc<ItemTree> {
|
||||
let _p = ra_prof::profile("item_tree_query");
|
||||
let _p = ra_prof::profile("item_tree_query").detail(|| format!("{:?}", file_id));
|
||||
let syntax = if let Some(node) = db.parse_or_expand(file_id) {
|
||||
node
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue