INNER CODE UNIT · Python

run_case

varunsalian/debrify · tool/webdav_memory_stress/run.py:128

def run_case(case, report, timeout, image_id, allow_probe_oom=False):
    label, limit, expected, arguments = case
    name = f"debrify-memory-{uuid.uuid4().hex[:12]}"
    limit_bytes = limit * 1024 * 1024
    started = time.monotonic()
    created = False
    timed_out = False
    try:
        command(
            "docker", "create", "--name", name,
            "--memory", str(limit_bytes), "--memory-swap", str(limit_bytes),
            "--cpus", "1", "--network", "none", "--pids-limit", "128",
            image_id, *arguments, stdout=subprocess.DEVNULL,
        )
        created = True
        # Compilation is outside this budget; the actual AOT process and its
        # loopback HTTP server, file cache and runtime are inside it.
        command("docker", "start", name, stdout=subprocess.DEVNULL)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…