https://github.com/ulule/makroud-benchmarks
Benchmarks for makroud
https://github.com/ulule/makroud-benchmarks
Last synced: 11 months ago
JSON representation
Benchmarks for makroud
- Host: GitHub
- URL: https://github.com/ulule/makroud-benchmarks
- Owner: ulule
- License: mit
- Created: 2019-03-03T12:59:41.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-06-29T12:20:42.000Z (about 6 years ago)
- Last Synced: 2025-08-15T21:56:25.113Z (12 months ago)
- Language: Go
- Size: 252 KB
- Stars: 0
- Watchers: 8
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Makroud benchmark
> **NOTE:** A benchmark is always an observation, not a measurement of performance.
## Requirements
At least **Go 1.14.0**.
## Setup
First of all, install latest version of others library:
```bash
go get -u -v "github.com/go-gorp/gorp"
go get -u -v "github.com/go-xorm/xorm"
go get -u -v "github.com/jinzhu/gorm"
go get -u -v "github.com/jmoiron/sqlx"
```
> **NOTE:** This benchmark doesn't include **[SQLBoiler](https://github.com/volatiletech/sqlboiler)**
> and **[Kallax](https://github.com/src-d/go-kallax)** since they rely on code generation and not reflection.
## Execute
```bash
go test -run=XXX -bench=SelectAll -benchmem -benchtime=10s
go test -run=XXX -bench=SelectSubset -benchmem -benchtime=10s
go test -run=XXX -bench=SelectComplex -benchmem -benchtime=10s
go test -run=XXX -bench=Insert -benchmem -benchtime=10s
go test -run=XXX -bench=Update -benchmem -benchtime=10s
go test -run=XXX -bench=Delete -benchmem -benchtime=10s
```
## Benchmark graph
```bash
cd graph && python3 graph.py
```


















## Acknowledgement
**SQLX** queries in this benchmark could be optimized.
However, since **Makroud** is built on top of **SQLX**, this benchmark highlight the difference of
performance using the same instructions.
**In every case**, using **SQLX** with a optimized workflow is more efficient than **Makroud**.
## Test Machine
```
OS: Archlinux x86_64 Linux-4.18.8
CPU: Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz
Memory: 16GB
Go: go version go1.11.2 linux/amd64
```
## Credits
- [SQLBoiler Benchmark repository](https://github.com/volatiletech/boilbench)