Skip to content

Commit 8d5aa08

Browse files
Merge #6726
6726: Add slightly more profiling details r=jonas-schievink a=jonas-schievink bors r+ Co-authored-by: Jonas Schievink <[email protected]>
2 parents 571f247 + b9d947c commit 8d5aa08

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

crates/hir/src/code_model.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,9 @@ impl Module {
362362
}
363363

364364
pub fn diagnostics(self, db: &dyn HirDatabase, sink: &mut DiagnosticSink) {
365-
let _p = profile::span("Module::diagnostics");
365+
let _p = profile::span("Module::diagnostics").detail(|| {
366+
format!("{:?}", self.name(db).map_or("<unknown>".into(), |name| name.to_string()))
367+
});
366368
let crate_def_map = db.crate_def_map(self.id.krate);
367369
crate_def_map.add_diagnostics(db.upcast(), self.id.local_id, sink);
368370
for decl in self.declarations(db) {

crates/ide_db/src/defs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ impl NameRefClass {
258258
sema: &Semantics<RootDatabase>,
259259
name_ref: &ast::NameRef,
260260
) -> Option<NameRefClass> {
261-
let _p = profile::span("classify_name_ref");
261+
let _p = profile::span("classify_name_ref").detail(|| name_ref.to_string());
262262

263263
let parent = name_ref.syntax().parent()?;
264264

0 commit comments

Comments
 (0)