feat: remove Gin and standardize on nethttp
This commit is contained in:
38
scripts/verifyPerformance.py
Executable file
38
scripts/verifyPerformance.py
Executable file
@@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Run GoOmni's repeatable stability checks and transport performance baseline."""
|
||||
|
||||
import argparse
|
||||
import os
|
||||
from pathlib import Path
|
||||
import subprocess
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("--go", default="go")
|
||||
parser.add_argument("--count", type=int, default=3)
|
||||
args = parser.parse_args()
|
||||
root = Path(__file__).resolve().parent.parent
|
||||
env = dict(os.environ, GOWORK="off")
|
||||
checks = [
|
||||
([args.go, "test", "-race", "./..."], "race tests"),
|
||||
([args.go, "vet", "./..."], "vet"),
|
||||
([args.go, "build", "./..."], "build"),
|
||||
(
|
||||
[args.go, "test", "-run", "^$", "-bench", "^BenchmarkTransport",
|
||||
"-benchmem", "-count", str(args.count), "./transport"],
|
||||
"transport benchmarks",
|
||||
),
|
||||
]
|
||||
for command, name in checks:
|
||||
print(f"Running {name}", flush=True)
|
||||
result = subprocess.run(command, cwd=root, env=env, text=True,
|
||||
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
print(result.stdout, end="")
|
||||
if result.returncode != 0:
|
||||
raise SystemExit(f"{name} failed with exit code {result.returncode}")
|
||||
print("PASS stability checks and transport performance baseline", flush=True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user