INNER CODE UNIT · Python

main

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

def main():
    args = arguments()
    listing = subprocess.run(server_command(args) + ["--list", "-a", args.a], text=True, capture_output=True)
    if listing.returncode != 0:
        print(listing.stdout + listing.stderr)
        return 2
    if args.list:
        print(listing.stdout, end="")
        return 0
    scenarios = [line.split()[0] for line in listing.stdout.splitlines() if line.startswith("hs-")]
    if not scenarios:
        print("no scenario selected")
        return 2
    args.out.mkdir(parents=True, exist_ok=True)
    result_file = Path(tempfile.mkdtemp(prefix="run_", dir=args.out)) / "results.csv"
    with result_file.open("w", newline="") as stream:
        writer = csv.writer(stream)
        writer.writerow(["scenario", "repeat", "concurrency", "workers", "exec_mode", "handshakes", "batch_ns", "status"])

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…