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:
16
common/pg.py
Normal file
16
common/pg.py
Normal 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)
|
||||
Reference in New Issue
Block a user