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

Resolve benchmark error #15

Merged
merged 2 commits into from
Sep 5, 2024
Merged

Conversation

Iajrdev
Copy link
Collaborator

@Iajrdev Iajrdev commented Sep 4, 2024

This PR resolves an issue where the script benchmark.sh was failing due to incorrect handling of exit statuses for background processes causing a unary operator expected error

Changes:

  • correctly capture exit statuses of background processes using $? after each wait
  • store exit statuses in status1, status2, and status3 for proper comparison
  • minor cleanup and readability improvements

Impact:

  • This fix ensures that the script correctly detects errors during benchmarking operations and terminates if any process fails

@Iajrdev Iajrdev self-assigned this Sep 4, 2024
benchmark.sh Outdated
@@ -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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good to me.
Is there a particular reason you changed the number of entries here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I changed the value because I wanted to check quickly if we still have an error or not.

Copy link
Collaborator

@alipourhabibi alipourhabibi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks good to me

@alipourhabibi alipourhabibi merged commit 4041ecf into PwPJ:main Sep 5, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants