Skip to content

Commit

Permalink
add bench-target as the prefix of output folder (#133)
Browse files Browse the repository at this point in the history
Signed-off-by: Yingchun Guo <[email protected]>
  • Loading branch information
daisy-ycguo authored Sep 19, 2024
1 parent ac52f79 commit 3f0ceaf
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions evals/benchmark/stresscli/commands/load_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,17 @@ def locust_runtests(kubeconfig, profile):
with open(profile, "r") as file:
profile_data = yaml.safe_load(file)

global_settings = profile_data["profile"]["global-settings"]
runs = profile_data["profile"]["runs"]

# create test log folder
hostpath = profile_data["profile"]["storage"]["hostpath"]
timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
base_folder = os.path.join(hostpath, f"{timestamp}")
testtarget = global_settings.get("bench-target", locust_defaults["bench-target"])
base_folder = os.path.join(hostpath, f"{testtarget}_{timestamp}")
os.makedirs(base_folder, exist_ok=True)

# Extract storage path and run details from profile
global_settings = profile_data["profile"]["global-settings"]
runs = profile_data["profile"]["runs"]

index = 1
for run in runs:
print(f"===Starting test: {run['name']}")
Expand Down

0 comments on commit 3f0ceaf

Please sign in to comment.