This pull request addresses issues in the SurrealDB benchmarking setup by improving error handling in the initialization process and the benchmarking script.
Description
The changes in this pull request include:
In the tests/surrealdb/bench/all.bench.ts file, the init function is now wrapped in a try-catch block to handle any errors that may occur during initialization. This ensures that any failures in the initialization process are properly reported and do not lead to unhandled exceptions.
In the tests/bench.sh script, the Docker commands are now executed with the set -e flag, which causes the script to exit immediately if any command returns a non-zero exit code. This ensures that any failures in starting the SurrealDB container are properly reported and do not lead to silent failures or incomplete setups.
Summary
Improved error handling in the tests/surrealdb/bench/all.bench.ts file by wrapping the init function in a try-catch block.
Improved error handling in the tests/bench.sh script by using the set -e flag to exit the script on any command failure.
Fixes #67.
[!TIP]
To get Sweep to edit this pull request, you can:
Comment below, and Sweep can edit the entire PR
Comment on a file, Sweep will only modify the commented file
Edit the original issue to get Sweep to recreate the PR from scratch
This is an automated message generated by Sweep AI.
Purpose
This pull request addresses issues in the SurrealDB benchmarking setup by improving error handling in the initialization process and the benchmarking script.
Description
The changes in this pull request include:
In the
tests/surrealdb/bench/all.bench.ts
file, theinit
function is now wrapped in atry-catch
block to handle any errors that may occur during initialization. This ensures that any failures in the initialization process are properly reported and do not lead to unhandled exceptions.In the
tests/bench.sh
script, the Docker commands are now executed with theset -e
flag, which causes the script to exit immediately if any command returns a non-zero exit code. This ensures that any failures in starting the SurrealDB container are properly reported and do not lead to silent failures or incomplete setups.Summary
tests/surrealdb/bench/all.bench.ts
file by wrapping theinit
function in atry-catch
block.tests/bench.sh
script by using theset -e
flag to exit the script on any command failure.Fixes #67.
This is an automated message generated by Sweep AI.