autonomy.analyse.logs.db
Database schemas and helpers
AgentLogsDB Objects
class AgentLogsDB()
Logs DB
__
init__
def __init__(agent: str, file: Path) -> None
Initialize object.
select
def select(start_time: Optional[datetime] = None,
end_time: Optional[datetime] = None,
log_level: Optional[str] = None,
period: Optional[int] = None,
round_name: Optional[str] = None,
behaviour_name: Optional[str] = None) -> List[LogRow]
Build select query.
execution_
path
def execution_path() -> List[Tuple[int, str, str]]
Extraction FSM execution path
cursor
@property
def cursor() -> sqlite3.Cursor
Creates and returns a database cursor.
exists
def exists() -> bool
Check if table already exists.
delete
def delete() -> "AgentLogsDB"
Delete table
create
def create(reset: bool = False) -> "AgentLogsDB"
Create agent table
insert_
many
def insert_many(logs: Iterator[LogRow]) -> "AgentLogsDB"
Insert a record