3028: Add profiling around add_impl_members r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
bors[bot] 2020-02-06 13:58:59 +00:00 committed by GitHub
commit 19de59a923
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 0 deletions

1
Cargo.lock generated
View file

@ -963,6 +963,7 @@ dependencies = [
"ra_db", "ra_db",
"ra_fmt", "ra_fmt",
"ra_hir", "ra_hir",
"ra_prof",
"ra_syntax", "ra_syntax",
"ra_text_edit", "ra_text_edit",
"rustc-hash", "rustc-hash",

View file

@ -16,6 +16,7 @@ either = "1.5"
ra_syntax = { path = "../ra_syntax" } ra_syntax = { path = "../ra_syntax" }
ra_text_edit = { path = "../ra_text_edit" } ra_text_edit = { path = "../ra_text_edit" }
ra_fmt = { path = "../ra_fmt" } ra_fmt = { path = "../ra_fmt" }
ra_prof = { path = "../ra_prof" }
ra_db = { path = "../ra_db" } ra_db = { path = "../ra_db" }
hir = { path = "../ra_hir", package = "ra_hir" } hir = { path = "../ra_hir", package = "ra_hir" }
test_utils = { path = "../test_utils" } test_utils = { path = "../test_utils" }

View file

@ -99,6 +99,7 @@ fn add_missing_impl_members_inner(
assist_id: &'static str, assist_id: &'static str,
label: &'static str, label: &'static str,
) -> Option<Assist> { ) -> Option<Assist> {
let _p = ra_prof::profile("add_missing_impl_members_inner");
let impl_node = ctx.find_node_at_offset::<ast::ImplBlock>()?; let impl_node = ctx.find_node_at_offset::<ast::ImplBlock>()?;
let impl_item_list = impl_node.item_list()?; let impl_item_list = impl_node.item_list()?;