Echo/Docs

CLI command

chat-latency

Read production P50/P95 chat response latency by site.

Invocation#

Shell
echo-cli chat-latency [days]

Inputs and output#

days defaults to 7 and must be an integer from 1 to 365. The result contains window_days, since, event_count, the 5000-row bound, and per-site client/server sample counts plus P50/P95 values for browser headers, first content, browser completion, backend headers, and proxy completion. The equivalent MCP tool is echo_chat_latency.

State effect#

The command selects only matching response-event fields, applies Echo's production exclusions, and reduces the rows in memory. Event rows, properties, timestamps, and user, anonymous, and session identities are not returned.

Refusals#

  • Without NEXT_PUBLIC_SUPABASE_URL it prints exactly "NEXT_PUBLIC_SUPABASE_URL is not configured" to stderr and exits 1.
  • After the URL is present, without SUPABASE_SERVICE_ROLE_KEY it prints exactly "SUPABASE_SERVICE_ROLE_KEY is not configured" to stderr and exits 1.
  • If Supabase refuses a SELECT, the CLI prints the returned database error message to stderr and exits 1.