Skip to content

perf: instrument MAP-NAV episode timings - #350

Merged
suguanYang merged 1 commit into
mainfrom
perf/wangbinqi/mapnav-timing-instrumentation
Aug 28, 2026
Merged

perf: instrument MAP-NAV episode timings#350
suguanYang merged 1 commit into
mainfrom
perf/wangbinqi/mapnav-timing-instrumentation

Conversation

@suguanYang

Copy link
Copy Markdown
Contributor

Summary

  • Add timing logs for MAP-NAV map scoring, planning, orchestration, harvest subgoals, plan-control waves, evidence packing, and each LLM call.
  • Preserve retrieval ranking, budgets, control flow, and output quality; this change is observability-only.
  • Emit timings in finally blocks around LLM, harvest, and control calls so failures and long waits are visible.

Why

A production trace completed in 743.94 seconds: 45.492 seconds snapshot loading, 695.293 seconds MAP-NAV episode, and 0.494 seconds hydration. The aggregate episode timing did not identify the internal waits. These logs provide the next trace with a complete phase-level breakdown.

Validation

  • uv run ruff check packages/shared-python/shared/services/retrieval/nav/nav_agent.py packages/shared-python/shared/services/retrieval/nav/nav_llm.py packages/shared-python/shared/services/retrieval/nav/nav_orchestrate.py
  • uv run pytest apps/api/tests/contract/test_retrieval_mapnav_session_contract.py

@suguanYang
suguanYang merged commit 9b355e5 into main Aug 28, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant