Skip to main content

Module telemetry_db

Module telemetry_db 

Source
Expand description

SQLite-backed telemetry database for agent performance tracking.

Stores events, per-agent metrics, per-task metrics, and session summaries in .batty/telemetry.db. All tables use CREATE TABLE IF NOT EXISTS — no migration framework needed.

Structs§

AgentMetricsRow
Agent metrics row for batty telemetry agents.
EventRow
Recent events row for batty telemetry events.
ReviewMetricsRow
Review pipeline metrics aggregated from the events table.
SessionSummaryRow
Summary row for batty telemetry summary.
TaskMetricsRow
Task metrics row for batty telemetry tasks.

Functions§

insert_event
Insert a raw event into the events table. Also updates derived metrics.
open
Open or create the telemetry database, initializing the schema.
query_agent_metrics
query_recent_events
query_review_metrics
Query aggregated review pipeline metrics from the events table.
query_session_summaries
query_task_metrics
record_agent_poll_state
Record an agent’s poll state (idle or working) and accumulate cycle time.