mirror of
https://github.com/taigrr/bitcask
synced 2025-01-18 04:03:17 -08:00
benchmarks: set test size to compute throughput (#16)
* benchmarks: set test size to compute throughput * patch: error on cross-filesystem rename operation * revert: commit to wrong branch
This commit is contained in:
parent
fd2023ee38
commit
3b63388e79
@ -528,6 +528,8 @@ func BenchmarkGet(b *testing.B) {
|
||||
|
||||
for _, tt := range tests {
|
||||
b.Run(tt.name, func(b *testing.B) {
|
||||
b.SetBytes(int64(tt.size))
|
||||
|
||||
key := "foo"
|
||||
value := []byte(strings.Repeat(" ", tt.size))
|
||||
|
||||
@ -576,6 +578,8 @@ func BenchmarkPut(b *testing.B) {
|
||||
|
||||
for _, tt := range tests {
|
||||
b.Run(tt.name, func(b *testing.B) {
|
||||
b.SetBytes(int64(tt.size))
|
||||
|
||||
key := "foo"
|
||||
value := []byte(strings.Repeat(" ", tt.size))
|
||||
b.ResetTimer()
|
||||
|
Loading…
x
Reference in New Issue
Block a user