Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add bench-target as the prefix of output folder #133

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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