获取仓库统计信息
(&self)
| 113 | |
| 114 | /// 获取仓库统计信息 |
| 115 | pub fn get_repository_stats(&self) -> RepositoryStats { |
| 116 | let entity_graph = self.entity_graph.read(); |
| 117 | let call_graph = self.call_graph.read(); |
| 118 | let snippet_service = self.snippet_service.read(); |
| 119 | |
| 120 | let (total_snippets, cached_snippets) = snippet_service.get_snippet_stats(); |
| 121 | |
| 122 | RepositoryStats { |
| 123 | total_classes: entity_graph.stats.total_classes, |
| 124 | total_functions: call_graph.stats.total_functions, |
| 125 | total_files: entity_graph.stats.total_files, |
| 126 | total_languages: entity_graph.stats.total_languages, |
| 127 | resolved_calls: call_graph.stats.resolved_calls, |
| 128 | unresolved_calls: call_graph.stats.unresolved_calls, |
| 129 | total_snippets, |
| 130 | cached_snippets, |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | /// 搜索实体 |
| 135 | pub fn search_entities(&self, query: &str) -> Vec<SearchResult> { |
no test coverage detected