Add benchmark results and tests for LSP graph builder and staged search

- Introduced a new benchmark results file for performance comparison on 2026-02-09.
- Added a test for LspGraphBuilder to ensure it does not expand nodes at maximum depth.
- Created a test for the staged search pipeline to validate fallback behavior when stage 1 returns empty results.
This commit is contained in:
catlog22
2026-02-09 21:43:13 +08:00
parent 4344e79e68
commit 362f354f1c
25 changed files with 2613 additions and 51 deletions

View File

@@ -134,7 +134,10 @@ class LspGraphBuilder:
# Skip if already visited or at max depth
if node.id in visited:
return []
if depth > self.max_depth:
# Depth is 0 for seeds. To limit expansion to N hops from seeds,
# we expand nodes with depth < max_depth.
if depth >= self.max_depth:
visited.add(node.id)
return []
if len(graph.nodes) >= self.max_nodes:
return []