libstp.timing.database

Classes

StepTimingDatabase

Async SQLite store for raw step execution history and anomaly flags.

Module Contents

class libstp.timing.database.StepTimingDatabase(db_path: str)

Async SQLite store for raw step execution history and anomaly flags.

db_path
async initialize() None

Create database and schema if needed.

async fetch_recent_durations(signature: str, limit: int) List[float]

Return the most recent non-anomalous durations for a signature.

async insert_execution(signature: str, duration: float, anomaly: libstp.timing.models.AnomalyDetection | None) None

Insert a completed execution into the database.