https://github.com/illarionov/sqlite-driver-benchmark
Benchmarks of the androidx.sqlite.SQLiteDriver imlplementations
https://github.com/illarionov/sqlite-driver-benchmark
android database microbenchmark sqlite testing webassembly
Last synced: 2 months ago
JSON representation
Benchmarks of the androidx.sqlite.SQLiteDriver imlplementations
- Host: GitHub
- URL: https://github.com/illarionov/sqlite-driver-benchmark
- Owner: illarionov
- License: other
- Created: 2025-03-17T17:44:08.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-01T07:42:36.000Z (about 1 year ago)
- Last Synced: 2025-05-01T08:34:40.413Z (about 1 year ago)
- Topics: android, database, microbenchmark, sqlite, testing, webassembly
- Language: Kotlin
- Homepage: https://wsoh.released.at/blog/benchmark
- Size: 593 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SQLite Driver Benchmarks
This project benchmarks the performance of various implementations of [SQLiteDriver][androidx.sqlite.SQLiteDriver]
on Android devices using the [Android Microbenchmark] framework.
The test results are available on the [Benchmarks](https://wsoh.released.at/blog/benchmark) blog post.
The project includes three groups of tests.
The first group measures the performance of SQLiteDriver implementations based on native
SQLite compilations. The drivers included in this comparison are:
* *androidx.sqlite.driver.AndroidSQLiteDriver*
* *androidx.sqlite.driver.BundledSQLiteDriver*
The second and third groups focus on benchmarking SQLiteDriver implementations from the
[Wasm SQLite Open Helper] project.
In the second group, SQLite is compiled to WebAssembly and then ahead-of-time compiled into
JVM bytecode (.class). `WasmSQLiteDriver (ChicorySqliteEmbedder)`
runs within the Chicory WebAssembly Runtime.
A third group benchmarks SQLite running in various WebAssembly interpreters for the JVM:
* Chicory interpreter
* Chasm interpreter
The [rawg-games-dataset] is used as the database source. Please ensure that Git LFS is installed.
## Execution
```shell
./gradlew bench:conAT
```
This command runs all benchmarks on the connected android device.
A real device is required for execution.
The results can be found in the
`bench/build/outputs/connected_android_test_additional_output/releaseAndroidTest/connected` directory.
The entire set of tests can take several hours to complete.
You can use the following commands to run limited sets of tests.
```shell
./gradlew bench:conAT -Pandroid.testInstrumentationRunnerArguments.annotation=at.released.sqlitedriverbenchmark.NativeDrivers
```
This command runs Native Driver benchmarks only.
```shell
./gradlew bench:conAT -Pandroid.testInstrumentationRunnerArguments.annotation=at.released.sqlitedriverbenchmark.ChicoryDrivers
```
This command runs Chicory AOT benchmarks only.
```shell
./gradlew bench:conAT -Pandroid.testInstrumentationRunnerArguments.annotation=at.released.sqlitedriverbenchmark.InterpreterDrivers
```
This command runs Interpreters benchmarks only.
[Android Microbenchmark]: https://developer.android.com/topic/performance/benchmarking/microbenchmark-overview
[Chasm]: https://github.com/CharlieTap/chasm
[Chicory WebAssembly Runtime]: https://chicory.dev/
[ChicorySqliteEmbedder]: https://wsoh.released.at/embedders/Chicory
[Wasm SQLite Open Helper]: https://wsoh.released.at/
[androidx.sqlite.SQLiteDriver]: https://developer.android.com/reference/kotlin/androidx/sqlite/SQLiteDriver
[rawg-games-dataset]: https://huggingface.co/datasets/atalaydenknalbant/rawg-games-dataset