perf(runtime): isolate workers and compress web assets
Some checks failed
CD Pipeline / deploy (push) Has been cancelled

This commit is contained in:
ogt
2026-07-11 09:48:41 +08:00
parent 6e65ef00bb
commit 0c85209ea1
21 changed files with 1124 additions and 436 deletions

View File

@@ -0,0 +1,34 @@
#!/usr/bin/env python3
"""Report or persist the current codebase modularization/performance inventory."""
from __future__ import annotations
import argparse
import json
import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
if str(ROOT) not in sys.path:
sys.path.insert(0, str(ROOT))
from services.codebase_modularization_performance_service import ( # noqa: E402
build_codebase_inventory,
write_codebase_inventory_receipt,
)
def main() -> int:
parser = argparse.ArgumentParser()
parser.add_argument("--write", action="store_true", help="persist the latest runtime receipt")
args = parser.parse_args()
result = build_codebase_inventory()
if args.write:
result["receipt_path"] = str(write_codebase_inventory_receipt(result))
print(json.dumps(result, ensure_ascii=False, indent=2))
return 0
if __name__ == "__main__":
raise SystemExit(main())