feat(convert): integrate process metrics into JSON and SQLite converters

- add process_metrics function to record peak RSS and CPU time
- update JSON converter to include metrics in completion marker
- modify SQLite converter to utilize new metrics for performance tracking
- enhance storage size updates with locking mechanism for concurrent access
This commit is contained in:
administrator
2026-07-11 21:39:08 -04:00
parent 96ed7bc918
commit 48c102d2a4
17 changed files with 1928 additions and 187 deletions

16
common/pg.py Normal file
View File

@@ -0,0 +1,16 @@
"""PostgreSQL DSN access (docs/rules/code-config-yaml.md section 3).
The DSN comes from the TRIBO_PG_DSN environment variable and is read ONLY
here. It may embed a password: never log it, never hardcode it, never
commit it - log host/database names at most.
"""
from __future__ import annotations
import os
DEFAULT_DSN = "postgresql://postgres@localhost:5432/tribo"
def get_dsn() -> str:
return os.environ.get("TRIBO_PG_DSN", DEFAULT_DSN)