mknet/scenarios/fragments/warp.py

18 lines
660 B
Python
Raw Permalink Normal View History

2022-09-15 16:04:37 +00:00
import os
from os.path import exists
from pathlib import Path
2022-09-23 21:20:10 +00:00
from fragments import shared, garage, flavor, minio
2022-09-15 16:04:37 +00:00
warp_bin = Path(os.path.dirname(__file__)) / "../../benchmarks/warp/warp"
2022-09-16 14:19:09 +00:00
bench = flavor.warp["warp-fast"]
2022-09-16 13:43:58 +00:00
2022-09-23 21:20:10 +00:00
def common(port, ak, sk):
out = Path(shared.storage_path) / "warp.csv"
2022-09-15 16:04:37 +00:00
shared.log(f"launching warp {warp_bin}")
2022-09-23 21:20:10 +00:00
shared.exec(f"{warp_bin} {bench} --host=[{os.environ['IP']}]:{port} --analyze.out={out} --access-key={ak} --secret-key={sk}")
2022-09-15 16:04:37 +00:00
shared.log(f"execution done")
2022-09-23 21:20:10 +00:00
def on_garage(): common(3900, garage.key.access_key_id, garage.key.secret_access_key)
def on_minio(): common(9000, minio.access_key, minio.secret_key)