Repository navigation
feat(mcp): keep a local tool latency log and show p50/p90 in status - #5022
RaghavChamadiya merged 1 commit into
Conversation
|
Looks safe to merge: no open points, no breaking contract change found, a test imports every changed code file. Reviewed the whole diff: nothing to fix. The wrapper's documented role is savings measurement (inv_01), and this change also makes it append a latency record to a file on each call. ✅ Health of changed files: 3.5 → 4.1 (+0.6; structure +0.5) Average full file score (structure and history) of 5 changed code files, weighted by size before this PR; not the repository score. 👀 Suggested reviewers RaghavChamadiya
Settings and updatesBlast radius, every caller of the contracts it changes, and health before and after. No sign-in. |
|
@RaghavChamadiya It's being a while since this PR is opened, could you please review this one |
RaghavChamadiya
left a comment
There was a problem hiding this comment.
Thanks @Asymtode712. The trim keeps the log bounded, a write failure never reaches the tool call, and nothing is written without a .repowise/ directory.
Summary
{"tool", "ms", "cold"}to<repo>/.repowise/mcp_calls.jsonl(skipped when.repowise/is absent). The file is trimmed to the last 2500 lines once it passes 5000, and a write failure never fails the tool call.repowise statusprints p50 and p90 per tool from the log, and nothing when the file is absent.Related Issues
Fixes #5000
Test Plan
pytest tests/unit/server/mcp/test_mcp_latency_log.py tests/unit/cli/test_status_storage.py tests/unit/server/mcp/test_tool_telemetry.py)ruff check .)npm run build) (if frontend changes) — N/AChecklist