analyze_perf
Analyze per-tool latency with session or historical windows. Returns count, p50, p95, max latency, errors, and error rate for each tool.
Instructions
Per-tool latency analysis. window='session' reads the in-memory ring (last 512 calls per tool — always available); window='1h'|'24h'|'7d'|'all' reads the persistent SQLite sink at ~/.doc-index/telemetry.db (opt-in via JDOCMUNCH_PERF_TELEMETRY=1). Returns {window, telemetry_enabled, source, per_tool:{tool:{count,p50_ms,p95_ms,max_ms,errors,error_rate}}}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| window | No | Time window. 'session' uses the in-memory ring; longer windows require JDOCMUNCH_PERF_TELEMETRY=1. | session |