INNER CODE UNIT · Python

deadline

openHiTLS/openHiTLS · testcode/benchmark/async_perf/run_async_perf.py:53

    deadline = time.monotonic() + 30
    client_cpus = []
    while time.monotonic() < deadline:
        line = log.readline()
        if line:
            binding = re.search(r" clients=([0-9,]+)", line)
            if binding:
                client_cpus = [int(cpu) for cpu in binding[1].split(",")]
                print(line.strip(), flush=True)
            if line.strip() == "LISTENING":
                return client_cpus
            if line.startswith("RESULT,"):
                return None
        elif server.poll() is not None:
            raise RuntimeError("server exited before listening")
        else:
            time.sleep(0.01)
    raise TimeoutError("server startup timed out")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…