From efc171c44c03fce1d33cefbeb75a1a4c1a37caba Mon Sep 17 00:00:00 2001 From: Iajrdev Date: Thu, 5 Sep 2024 00:42:30 +0330 Subject: [PATCH 1/2] Resolve benchmark error --- benchmark.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/benchmark.sh b/benchmark.sh index 2d581e5..8db947a 100755 --- a/benchmark.sh +++ b/benchmark.sh @@ -16,7 +16,7 @@ trap cleanup EXIT SIGINT SIGTERM # Generate random numbers for insert and find operations INSERT_FILE="inserts.json" FIND_FILE="finds.txt" -NUM_ENTRIES=100000 +NUM_ENTRIES=100 # Create random insert JSON echo "[" > $INSERT_FILE @@ -102,8 +102,13 @@ echo "Benchmarking RWMutex find operation..." wrk -t12 -c100 -d30s -s rwget.lua http://localhost:8080 & pid3=$! -# Wait for all background processes to finish -wait $pid1 $pid2 $pid3 +# Wait for all background processes to finish and capture their exit statuses +wait $pid1 +status1=$? +wait $pid2 +status2=$? +wait $pid3 +status3=$? # Check the exit statuses and exit with an error if any command failed if [ $status1 -ne 0 ]; then @@ -122,4 +127,3 @@ if [ $status3 -ne 0 ]; then fi echo "Completed successfully" - From cdb4c3fc6bc86696c003d8f186e36a4c46563762 Mon Sep 17 00:00:00 2001 From: Iajrdev Date: Thu, 5 Sep 2024 11:40:24 +0330 Subject: [PATCH 2/2] change entries value --- benchmark.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmark.sh b/benchmark.sh index 8db947a..c230e7f 100755 --- a/benchmark.sh +++ b/benchmark.sh @@ -16,7 +16,7 @@ trap cleanup EXIT SIGINT SIGTERM # Generate random numbers for insert and find operations INSERT_FILE="inserts.json" FIND_FILE="finds.txt" -NUM_ENTRIES=100 +NUM_ENTRIES=100000 # Create random insert JSON echo "[" > $INSERT_FILE