From 26d6d453130d8f369334b925fb5fcabcf68c93cc Mon Sep 17 00:00:00 2001 From: Hubert Gruszecki Date: Mon, 9 Dec 2024 15:57:30 +0100 Subject: [PATCH] Change directories for performance scripts results (#1374) --- scripts/performance/run-standard-performance-suite.sh | 5 ++--- scripts/performance/utils.sh | 4 +++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/performance/run-standard-performance-suite.sh b/scripts/performance/run-standard-performance-suite.sh index 0f6a3d6bb..2ea8372aa 100755 --- a/scripts/performance/run-standard-performance-suite.sh +++ b/scripts/performance/run-standard-performance-suite.sh @@ -26,9 +26,8 @@ trap on_exit_bench EXIT echo "Building project..." cargo build --release -# Remove old performance results -echo "Cleaning old performance results..." -rm -rf performance_results || true +# Create a directory for the performance results +(mkdir performance_results || true) &> /dev/null # Construct standard performance suites, each should process 8 GB of data STANDARD_SEND=$(construct_bench_command "$IGGY_BENCH_CMD" "send" 8 1000 1000 1000 tcp) # 8 producers, 8 streams, 1000 byte messages, 1000 messages per batch, 1000 message batches, tcp diff --git a/scripts/performance/utils.sh b/scripts/performance/utils.sh index 8ce356356..88c6a3195 100755 --- a/scripts/performance/utils.sh +++ b/scripts/performance/utils.sh @@ -76,7 +76,9 @@ function construct_bench_command() { local streams=${count} local superdir - superdir="performance_results_$(get_git_iggy_server_tag_or_sha1 .)" || { echo "Failed to get git commit or tag."; exit 1; } + superdir="performance_results/$(get_git_iggy_server_tag_or_sha1 .)" || { echo "Failed to get git commit or tag."; exit 1; } + rm -rf "$superdir" || true + mkdir -p "$superdir" || { echo "Failed to create directory '$superdir'."; exit 1; } local output_directory="${superdir}/${type}_${count}${type:0:1}_${message_size}_${messages_per_batch}_${message_batches}_${protocol}" echo "$bench_command \