From 549c548e7cc8f99da37b931b6aa991093f097fd7 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Mon, 19 Sep 2022 14:16:08 +0200 Subject: Commit WIP --- scenarios/fragments/garage.py | 7 +++++-- scenarios/fragments/s3concurrent.py | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'scenarios/fragments') diff --git a/scenarios/fragments/garage.py b/scenarios/fragments/garage.py index c1e09d0..8699655 100644 --- a/scenarios/fragments/garage.py +++ b/scenarios/fragments/garage.py @@ -120,11 +120,13 @@ _cluster_info = None def cluster_info(): global _cluster_info if _cluster_info is not None: return _cluster_info + shared.log("fetch cluster info") while True: - time.sleep(1) node_files = glob.glob(f"{shared.storage_path}/**/node_info", recursive=True) - if len(node_files) == shared.count(): break + if len(node_files) >= shared.count(): break + shared.log(f"found {len(node_files)} over {shared.count()}, wait 1 sec.") + time.sleep(1) _cluster_info = [ json.loads(Path(f).read_text()) for f in node_files ] return _cluster_info @@ -132,6 +134,7 @@ def cluster_info(): def connect(): cinf = cluster_info() + shared.log("start connections...") ret = nodes.add_node([n['node_addr'] for n in cinf]) for st in ret: if not st.success: diff --git a/scenarios/fragments/s3concurrent.py b/scenarios/fragments/s3concurrent.py index 1431e0b..f1cb96d 100644 --- a/scenarios/fragments/s3concurrent.py +++ b/scenarios/fragments/s3concurrent.py @@ -3,7 +3,7 @@ from os.path import exists from pathlib import Path from fragments import shared, garage -s3bin = Path(os.path.dirname(__file__)) / "../../benchmarks/s3lat/s3lat" +s3bin = Path(os.path.dirname(__file__)) / "../../benchmarks/s3concurrent/s3concurrent" def on_garage(): os.environ['AWS_ACCESS_KEY_ID'] = garage.key.access_key_id @@ -11,6 +11,6 @@ def on_garage(): os.environ['ENDPOINT'] = "localhost:3900" out = Path(shared.storage_path) / "s3concurrent.csv" - shared.log(f"launching s3lat ({s3bin})") + shared.log(f"launching s3concurrent ({s3bin})") shared.exec(f"{s3bin} > {out}") shared.log(f"execution done, output written to {out}") -- cgit v1.2.3