From e13065b8aca98f99553b61129e776ae3688dbdfc Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 18 Jan 2021 13:25:57 +0300 Subject: Add profile call --- crates/project_model/src/workspace.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'crates/project_model/src') diff --git a/crates/project_model/src/workspace.rs b/crates/project_model/src/workspace.rs index 06a0be284..c511320d7 100644 --- a/crates/project_model/src/workspace.rs +++ b/crates/project_model/src/workspace.rs @@ -207,6 +207,7 @@ impl ProjectWorkspace { proc_macro_client: Option<&ProcMacroClient>, load: &mut dyn FnMut(&AbsPath) -> Option, ) -> CrateGraph { + let _p = profile::span("ProjectWorkspace::to_crate_graph"); let proc_macro_loader = |path: &Path| match proc_macro_client { Some(client) => client.by_dylib_path(path), None => Vec::new(), @@ -299,6 +300,7 @@ fn cargo_to_crate_graph( sysroot: &Sysroot, rustc: &Option, ) -> CrateGraph { + let _p = profile::span("cargo_to_crate_graph"); let mut crate_graph = CrateGraph::default(); let (public_deps, libproc_macro) = sysroot_to_crate_graph(&mut crate_graph, sysroot, target, load); @@ -493,6 +495,7 @@ fn sysroot_to_crate_graph( target: Option<&str>, load: &mut dyn FnMut(&AbsPath) -> Option, ) -> (Vec<(CrateName, CrateId)>, Option) { + let _p = profile::span("sysroot_to_crate_graph"); let mut cfg_options = CfgOptions::default(); cfg_options.extend(get_rustc_cfg_options(target)); let sysroot_crates: FxHashMap = sysroot -- cgit v1.2.3