feat(ingest): add time taken by compute stats overall (#14713)

This commit is contained in:
Aseem Bansal 2025-09-09 14:53:13 +05:30 committed by GitHub
parent aee04b5680
commit 5ce93f54b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -204,6 +204,7 @@ class ExamplesReport(Report, Closeable):
samples: Dict[str, Dict[str, List[str]]] = field(
default_factory=lambda: defaultdict(lambda: defaultdict(list))
)
compute_stats_time_seconds: float = 0.0
_file_based_dict: Optional[FileBackedDict[SourceReportSubtypes]] = None
# We are adding this to make querying easier for fine-grained lineage
@ -405,6 +406,7 @@ class ExamplesReport(Report, Closeable):
self._update_file_based_dict(urn, entityType, aspectName, mcp)
def compute_stats(self) -> None:
start_time = datetime.now()
if self._file_based_dict is None:
return
@ -466,6 +468,8 @@ class ExamplesReport(Report, Closeable):
list(self._lineage_aspects_seen), "lineage"
)
self._collect_samples_with_all_conditions("all_3")
end_time = datetime.now()
self.compute_stats_time_seconds += (end_time - start_time).total_seconds()
class EntityFilterReport(ReportAttribute):