-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add benchmark documentation and improve publish script
Created a README for benchmark tests, outlining setup, scenarios, and results. Enhanced the publish script to include documentation generation, version tagging, and cleanup adjustments. Renamed benchmark folders for better clarity.
- Loading branch information
1 parent
ad622f7
commit c7f1b2c
Showing
5 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# sqlx4k - Benchmarks | ||
|
||
## Setup | ||
|
||
- All tests were performed on my MacBook Pro M1 Max, 64GB RAM. | ||
- The database was installed inside a Docker container, using ARM64 images. | ||
- Apart from the database drivers, the rest of the code was kept as similar as possible. | ||
- The Docker engine was using the new Docker VMM. | ||
|
||
## Runs | ||
|
||
We conducted three scenarios: | ||
|
||
- `no-transaction`: A set of 3 queries was executed — two inserts and one fetch. | ||
- `transaction-commit`: 3 queries were executed within a transaction (two inserts and one fetch), followed by a | ||
fetch after the transaction was completed. | ||
- `transaction-rollback`: 3 queries were executed within a transaction (two inserts and one fetch), followed by a | ||
fetch after the transaction was rolled back. | ||
|
||
In each scenario, we used **4 workers**. Each worker executed the test **1000 times** in a loop. | ||
We performed **10 runs** per scenario and calculated the average execution time. | ||
|
||
## Results | ||
|
||
### PostgreSQL | ||
|
||
| kind | no-tx | tx-commit | tx-rollback | | ||
|-------------------|:---------:|:---------:|:-----------:| | ||
| rust-sqlx | | | | | ||
| spring-boot-r2dbc | 2.982300s | 4.623800s | 3.522100s | | ||
| sqlx4k | 3.484700s | 4.884900s | 3.552010s | |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,5 +1,19 @@ | ||
#!/usr/bin/env sh | ||
|
||
./gradlew clean build -Ptargets=all | ||
|
||
./gradlew :dokkaHtmlMultiModule | ||
rm -rf ./docs/* | ||
cp -R ./build/dokka/htmlMultiModule/* ./docs/ | ||
|
||
version=$(./gradlew properties -q | awk '/^version:/ {print $2}') | ||
git add --all | ||
git commit -m "Added documentation for '$version'." | ||
git push | ||
|
||
git tag "$version" -f | ||
git push --tags -f | ||
|
||
cat local.properties >> gradle.properties | ||
./gradlew clean publishAllPublicationsToMavenCentralRepository -Ptargets=all | ||
./gradlew publishAllPublicationsToMavenCentralRepository -Ptargets=all | ||
git checkout . |