-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Diesel Performance Fixes, Batching Improvements, New Allocator (#262)
* refactor to diesel async * remove 4 re-allocations by modifying DB and insertion layer * implement better chunking logic, fix clippy * switch to jemalloc * fail gracefully on file insert, switch to hashset hashset about 0.3% CPU time improvement * vec with capacity: 0.3% speed increase * precompute duration * bump deps, fxhashmap fxhasmap -> 0.25% perf * fmt * fix cargo.lock * bump axum, fix clippy * integration tests fix * spruce up comments, fix dependency * the max --------- Co-authored-by: wyattb <[email protected]>
- Loading branch information
Showing
24 changed files
with
1,230 additions
and
792 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,37 @@ | ||
#!/bin/sh | ||
echo "Starting db" | ||
cd ../compose | ||
docker compose up -d odyssey-timescale | ||
|
||
cd ../scylla-server | ||
echo "Migrating DB" | ||
diesel migration run | ||
# Navigate to the compose directory | ||
echo "Navigating to compose directory..." | ||
cd ../compose || { echo "Compose directory not found"; exit 1; } | ||
|
||
echo "Running tests" | ||
DATABASE_URL=postgresql://postgres:[email protected]:5432/postgres cargo test -- --test-threads=1 | ||
# Remove any existing odyssey-timescale container | ||
echo "Stopping and removing any existing odyssey-timescale container..." | ||
docker rm -f odyssey-timescale 2>/dev/null || echo "No existing container to remove." | ||
|
||
echo "Exiting" | ||
cd ../compose | ||
docker compose down | ||
# Start a new odyssey-timescale container | ||
echo "Starting a new odyssey-timescale container..." | ||
docker compose up -d odyssey-timescale || { echo "Failed to start odyssey-timescale"; exit 1; } | ||
|
||
# Wait for the database to initialize | ||
echo "Waiting for the database to initialize..." | ||
sleep 3 | ||
|
||
# Navigate to the scylla-server directory | ||
cd ../scylla-server || { echo "scylla-server directory not found"; exit 1; } | ||
|
||
# Run database migrations | ||
echo "Running database migrations..." | ||
DATABASE_URL=postgresql://postgres:[email protected]:5432/postgres diesel migration run || { echo "Migration failed"; exit 1; } | ||
|
||
# Run tests | ||
echo "Running tests..." | ||
DATABASE_URL=postgresql://postgres:[email protected]:5432/postgres cargo test -- --test-threads=1 || { echo "Tests failed"; exit 1; } | ||
|
||
# Navigate back to the compose directory | ||
cd ../compose || { echo "Compose directory not found"; exit 1; } | ||
|
||
# Stop and clean up containers | ||
echo "Stopping and cleaning up containers..." | ||
docker compose down || { echo "Failed to clean up containers"; exit 1; } | ||
|
||
echo "Script completed successfully!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.