Files
tmail-flutter/scripts/memory_report/data.py
T
Dang Dat 4707aa7188 ci: add memory sidecar and leak report
The sidecar takes heap snapshots over CDP on web. The report applies rules
R1-R5 to the before and after samples and always renders a summary.

Refs #4365
2026-11-06 15:40:29 +07:00

14 lines
281 B
Python

"""Shared sample input and row accumulation."""
import json
def load_json(path):
with path.open(encoding="utf-8") as stream:
return json.load(stream)
def add_row(rows, key, count, size):
row = rows.setdefault(key, [0, 0])
row[0] += count
row[1] += size