From 74b6b1bbb09d784e7db29cf8c41751f3e9b73270 Mon Sep 17 00:00:00 2001 From: Jacob Gadikian Date: Mon, 15 Jan 2024 04:33:33 +0700 Subject: [PATCH] make benchmarks as clear as possible --- pebble.go | 2 +- pebble_test.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pebble.go b/pebble.go index 4c436e9..27980e4 100644 --- a/pebble.go +++ b/pebble.go @@ -57,7 +57,7 @@ const ( // minHandles is the minimum number of files handles to allocate to the open // database files. - minHandles = 2048 + minHandles = 8192 ) var ( diff --git a/pebble_test.go b/pebble_test.go index ad3080a..5d27bd5 100644 --- a/pebble_test.go +++ b/pebble_test.go @@ -60,8 +60,8 @@ func BenchmarkDB(b *testing.B) { var variationCases []BenchmarkVariationsCase // Define the range of keys and values - keys := []int{1e2, 1e3, 1e4, 1e5} - values := []int{1 << 11, 1 << 12, 1 << 13} + keys := []int{10000, 25000, 50000, 75000, 100000} // 10k, 100k - things we figure would happen in prod + values := []int{512, 1024, 2048, 4096} // 2KB, 4KB, 8KB - things we figure would happen in prod // Define the backends backends := []BackendType{PebbleDBBackend, GoLevelDBBackend} @@ -74,7 +74,7 @@ func BenchmarkDB(b *testing.B) { } for _, backend := range backends { variationCases = append(variationCases, BenchmarkVariationsCase{ - Name: fmt.Sprintf("Keys_%de3_Values_%d", key, value), + Name: fmt.Sprintf("Keys_%d_Values_%d", key, value), Backend: backend, NumKeys: key, ValueSize: value,