Document scaling experiment, measured database boundary and verified failure recovery
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
"""Record non-secret container identity/lifecycle fields for restart evidence."""
|
||||
|
||||
import json
|
||||
import subprocess
|
||||
import sys
|
||||
@@ -8,7 +9,14 @@ ids = subprocess.check_output(["docker", "compose", "ps", "-q"], text=True).spli
|
||||
rows = []
|
||||
for cid in ids:
|
||||
raw = json.loads(subprocess.check_output(["docker", "inspect", cid], text=True))[0]
|
||||
rows.append({"id": cid, "service": raw["Config"]["Labels"]["com.docker.compose.service"],
|
||||
"image_id": raw["Image"], "started_at": raw["State"]["StartedAt"],
|
||||
"cpu_quota": raw["HostConfig"]["NanoCpus"], "memory": raw["HostConfig"]["Memory"]})
|
||||
rows.append(
|
||||
{
|
||||
"id": cid,
|
||||
"service": raw["Config"]["Labels"]["com.docker.compose.service"],
|
||||
"image_id": raw["Image"],
|
||||
"started_at": raw["State"]["StartedAt"],
|
||||
"cpu_quota": raw["HostConfig"]["NanoCpus"],
|
||||
"memory": raw["HostConfig"]["Memory"],
|
||||
}
|
||||
)
|
||||
Path(sys.argv[1]).write_text(json.dumps(rows, indent=2) + "\n")
|
||||
|
||||
Reference in New Issue
Block a user