-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
40022c5
commit 2b1b0e2
Showing
9 changed files
with
306 additions
and
21 deletions.
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 |
---|---|---|
|
@@ -10,6 +10,30 @@ env: | |
RUST_BACKTRACE: full | ||
|
||
jobs: | ||
build_bench: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: [ubuntu-latest] | ||
toolchain: [stable] | ||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | ||
- name: Setup Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.toolchain }} | ||
override: true | ||
- uses: extractions/setup-just@v1 | ||
- uses: hustcer/[email protected] | ||
with: | ||
version: '0.85' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.PAT_GLOBAL }} | ||
- name: Just version | ||
run: just --version | ||
- name: Build | ||
run: just bench_build | ||
build_test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
|
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Benchmarks | ||
|
||
Highlight the Native DB overhead compared to direct access to the underlying database ([redb](https://github.com/cberner/redb)). | ||
|
||
The benchmarks ignore: | ||
- [`native_model`](https://github.com/vincent-herlemont/native_model) overhead. | ||
- Serialization overhead used by `native_model` like `bincode`,`postcard` etc. | ||
- The fact that `redb` can copy the data using zero-copy. | ||
|
||
## Run benchmarks | ||
|
||
If you want to run the benchmarks, you need to install [just](https://github.com/casey/just), [nushell](https://www.nushell.sh/) and run: | ||
```bash | ||
just bench | ||
``` | ||
|
||
## Results | ||
|
||
We can see that the overhead is very low. These result are obtained with the version `0.5.3` of `native_db`. | ||
|
||
![](./results/insert_random.png) | ||
![](./results/get_random.png) | ||
![](./results/remove_random.png) | ||
![](./results/scan_random.png) |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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