Skip to content

Commit d8bd2b8

Browse files
arthaudmeta-codesync[bot]
authored andcommitted
Add timing for each step, and split the module info into steps
Reviewed By: tianhan0 Differential Revision: D84360035 fbshipit-source-id: 31f24d45fdd62a2e55642c1acc6401fedd349df6
1 parent 36a5ee2 commit d8bd2b8

File tree

5 files changed

+268
-77
lines changed

5 files changed

+268
-77
lines changed

pyrefly/lib/report/pysa/function.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ use crate::report::pysa::module::ModuleKey;
4141
use crate::report::pysa::override_graph::WholeProgramReversedOverrideGraph;
4242
use crate::report::pysa::scope::ScopeParent;
4343
use crate::report::pysa::scope::get_scope_parent;
44+
use crate::report::pysa::step_logger::StepLogger;
4445
use crate::report::pysa::types::PysaType;
4546
use crate::state::lsp::FindDefinitionItemWithDocstring;
4647
use crate::state::state::Transaction;
@@ -552,6 +553,11 @@ pub fn collect_function_base_definitions(
552553
module_ids: &ModuleIds,
553554
reversed_override_graph: &WholeProgramReversedOverrideGraph,
554555
) -> WholeProgramFunctionDefinitions<FunctionBaseDefinition> {
556+
let step = StepLogger::start(
557+
"Indexing function definitions",
558+
"Indexed function definitions",
559+
);
560+
555561
let base_definitions = dashmap::DashMap::new();
556562

557563
ThreadPool::new().install(|| {
@@ -565,5 +571,6 @@ pub fn collect_function_base_definitions(
565571
});
566572
});
567573

574+
step.finish();
568575
WholeProgramFunctionDefinitions(base_definitions.into_read_only())
569576
}

0 commit comments

Comments
 (0)