github.com/authzed/spicedb@v1.32.1-0.20240520085336-ebda56537386/internal/datastore/benchmark/README.md (about) 1 # Datastore Driver Benchmark 2 3 ## To Run 4 5 `go test ./... -tags ci,docker -bench . -benchmem` 6 7 ## Results on an Macbook Pro M1 Max w/64 GB 8 9 Note: MySQL is using `mysql:5` image which doesn't have an arm image. 10 11 ```sh 12 goos: darwin 13 goarch: arm64 14 pkg: github.com/authzed/spicedb/internal/datastore/benchmark 15 BenchmarkDatastoreDriver/postgres/TestTuple/SnapshotRead-10 2100 532025 ns/op 13948 B/op 232 allocs/op 16 BenchmarkDatastoreDriver/postgres/TestTuple/Touch-10 500 2289054 ns/op 16622 B/op 269 allocs/op 17 BenchmarkDatastoreDriver/postgres/TestTuple/Create-10 720 1820216 ns/op 10057 B/op 141 allocs/op 18 BenchmarkDatastoreDriver/crdb-overlap-static/TestTuple/SnapshotRead-10 1357 830114 ns/op 13263 B/op 211 allocs/op 19 BenchmarkDatastoreDriver/crdb-overlap-static/TestTuple/Touch-10 100 11445458 ns/op 16526 B/op 225 allocs/op 20 BenchmarkDatastoreDriver/crdb-overlap-static/TestTuple/Create-10 100 11145802 ns/op 14908 B/op 220 allocs/op 21 BenchmarkDatastoreDriver/crdb-overlap-insecure/TestTuple/SnapshotRead-10 1590 698306 ns/op 13269 B/op 211 allocs/op 22 BenchmarkDatastoreDriver/crdb-overlap-insecure/TestTuple/Touch-10 364 3566063 ns/op 14613 B/op 211 allocs/op 23 BenchmarkDatastoreDriver/crdb-overlap-insecure/TestTuple/Create-10 370 2984686 ns/op 13035 B/op 206 allocs/op 24 BenchmarkDatastoreDriver/mysql/TestTuple/SnapshotRead-10 477 2483215 ns/op 14355 B/op 312 allocs/op 25 BenchmarkDatastoreDriver/mysql/TestTuple/Touch-10 160 7413188 ns/op 11717 B/op 207 allocs/op 26 BenchmarkDatastoreDriver/mysql/TestTuple/Create-10 241 4857547 ns/op 6380 B/op 113 allocs/op 27 BenchmarkDatastoreDriver/memdb/TestTuple/SnapshotRead-10 12073 98569 ns/op 2375 B/op 48 allocs/op 28 BenchmarkDatastoreDriver/memdb/TestTuple/Touch-10 35023 38734 ns/op 44556 B/op 522 allocs/op 29 BenchmarkDatastoreDriver/memdb/TestTuple/Create-10 36390 40246 ns/op 48386 B/op 528 allocs/op 30 ```