Skip to content

Commit

Permalink
Merge pull request #15 from Iajrdev/resolve-benchmark-error
Browse files Browse the repository at this point in the history
Resolve benchmark error
  • Loading branch information
alipourhabibi authored Sep 5, 2024
2 parents dbedff3 + cdb4c3f commit 4041ecf
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -122,4 +127,3 @@ if [ $status3 -ne 0 ]; then
fi

echo "Completed successfully"

0 comments on commit 4041ecf

Please sign in to comment.