Benchmark的结果:

  1. badger 2019/03/11 18:06:05 INFO: All 0 tables opened in 0s
  2. goos: darwin
  3. goarch: amd64
  4. pkg: github.com/xujiajun/kvstore-bench
  5. BenchmarkBadgerDBPutValue64B-8 10000 112382 ns/op 2374 B/op 74 allocs/op
  6. BenchmarkBadgerDBPutValue128B-8 20000 94110 ns/op 2503 B/op 74 allocs/op
  7. BenchmarkBadgerDBPutValue256B-8 20000 93480 ns/op 2759 B/op 74 allocs/op
  8. BenchmarkBadgerDBPutValue512B-8 10000 101407 ns/op 3271 B/op 74 allocs/op
  9. BenchmarkBadgerDBGet-8 1000000 1552 ns/op 416 B/op 9 allocs/op
  10. BenchmarkBoltDBPutValue64B-8 10000 203128 ns/op 21231 B/op 62 allocs/op
  11. BenchmarkBoltDBPutValue128B-8 5000 229568 ns/op 13716 B/op 64 allocs/op
  12. BenchmarkBoltDBPutValue256B-8 10000 196513 ns/op 17974 B/op 64 allocs/op
  13. BenchmarkBoltDBPutValue512B-8 10000 199805 ns/op 17064 B/op 64 allocs/op
  14. BenchmarkBoltDBGet-8 1000000 1122 ns/op 592 B/op 10 allocs/op
  15. BenchmarkNutsDBPutValue64B-8 30000 53614 ns/op 626 B/op 14 allocs/op
  16. BenchmarkNutsDBPutValue128B-8 30000 51998 ns/op 664 B/op 13 allocs/op
  17. BenchmarkNutsDBPutValue256B-8 30000 53958 ns/op 920 B/op 13 allocs/op
  18. BenchmarkNutsDBPutValue512B-8 30000 55787 ns/op 1432 B/op 13 allocs/op
  19. BenchmarkNutsDBGet-8 2000000 661 ns/op 88 B/op 3 allocs/op
  20. BenchmarkNutsDBGetByHintKey-8 50000 27255 ns/op 840 B/op 16 allocs/op
  21. PASS
  22. ok github.com/xujiajun/kvstore-bench 83.856s