MCPcopy Create free account
hub / github.com/OpenIPC/firmware / main

Function main

general/scripts/size_report.py:372–391  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

370
371
372def main() -> None:
373 report = build_report()
374 images_dir = Path(env("IMAGES_DIR"))
375 out_path = images_dir / f"sizes.{report['board']}-{report['variant']}.json"
376 images_dir.mkdir(parents=True, exist_ok=True)
377 out_path.write_text(json.dumps(report, indent=2) + "\n")
378 pkgs = len(report["packages"])
379 mods = len(report["linux_components"]["modules"])
380 rem = len(report["removed_by_finalize"])
381 rootfs = report["rootfs"]
382 headroom = report["headroom"]
383 print(
384 f"size-report: {out_path}\n"
385 f" packages={pkgs} modules={mods} removed={rem}\n"
386 f" rootfs={rootfs.get('compressed_bytes')}B "
387 f"(uncompressed {rootfs.get('uncompressed_bytes')}B, "
388 f"ratio {rootfs.get('compression_ratio')})\n"
389 f" headroom: kernel={headroom['kernel']['headroom_kb']}KB "
390 f"rootfs={headroom['rootfs']['headroom_kb']}KB"
391 )
392
393
394if __name__ == "__main__":

Callers 1

size_report.pyFile · 0.70

Calls 3

printFunction · 0.85
build_reportFunction · 0.70
envFunction · 0.70

Tested by

no test coverage detected