import json, glob, sys
# diagshow.py TAG: each rank table state at each dump (in-memory sha, on-disk sha).
for f in sorted(glob.glob("/home/arbi-admin/determinism/dump/diag_%s_*.jsonl" % sys.argv[1])):
    for l in open(f):
        j = json.loads(l)
        print(f.split("/")[-1][5:-6], "%.1f" % (j["t"] % 100000), j["where"], "swept", j["swept"], [(t["fp"][:6], "mem", t["mem_sha"], "disk", t["disk_sha"]) for t in j["tables"]])
