timing.database =============== .. py:module:: timing.database Attributes ---------- .. autoapisummary:: timing.database.logger Classes ------- .. autoapisummary:: timing.database.StepTimingDatabase Module Contents --------------- .. py:data:: logger .. py:class:: StepTimingDatabase(db_path: str) Async SQLite store for raw step execution history and anomaly flags. .. py:attribute:: db_path .. py:method:: initialize() -> None :async: Create database and schema if needed. If the existing database file is corrupted, it is deleted and recreated automatically. .. py:method:: fetch_recent_durations(signature: str, limit: int) -> List[float] :async: Return the most recent non-anomalous durations for a signature. .. py:method:: insert_execution(signature: str, duration: float, anomaly: Optional[timing.models.AnomalyDetection]) -> None :async: Insert a completed execution into the database.