你的性能数据是怎么测试出来的?
yyt030 opened this issue · 0 comments
yyt030 commented
我使用你的测试案例,运行下来结果如下:
badger 2020/04/28 23:13:19 INFO: All 0 tables opened in 0s
goos: windows
goarch: amd64
pkg: bench
BenchmarkBadgerDBPutValue64B-4 128113 27640 ns/op 2312 B/op 74 allocs/op
BenchmarkBadgerDBPutValue128B-4 129963 26977 ns/op 2465 B/op 74 allocs/op
BenchmarkBadgerDBPutValue256B-4 119204 27633 ns/op 2719 B/op 73 allocs/op
BenchmarkBadgerDBPutValue512B-4 128113 31816 ns/op 3227 B/op 73 allocs/op
BenchmarkBadgerDBGet-4 1406798 2491 ns/op 416 B/op 9 allocs/op
BenchmarkBoltDBPutValue64B-4 3795 956522 ns/op 18134 B/op 57 allocs/op
BenchmarkBoltDBPutValue128B-4 3564 1355219 ns/op 14351 B/op 64 allocs/op
BenchmarkBoltDBPutValue256B-4 3157 968008 ns/op 16757 B/op 64 allocs/op
BenchmarkBoltDBPutValue512B-4 3302 1013931 ns/op 17740 B/op 64 allocs/op
BenchmarkBoltDBGet-4 2312138 1583 ns/op 592 B/op 10 allocs/op
BenchmarkNutsDBPutValue64B-4 1200 2712500 ns/op 973 B/op 17 allocs/op
BenchmarkNutsDBPutValue128B-4 1153 3211622 ns/op 986 B/op 16 allocs/op
BenchmarkNutsDBPutValue256B-4 843 4676157 ns/op 1235 B/op 16 allocs/op
BenchmarkNutsDBPutValue512B-4 434 8347926 ns/op 1974 B/op 16 allocs/op
BenchmarkNutsDBGet-4 3797467 993 ns/op 216 B/op 4 allocs/op
从上面来看,写入的性能还是比较慢的。