Skip to content

Commit

Permalink
make benchmarks as clear as possible
Browse files Browse the repository at this point in the history
  • Loading branch information
faddat committed Jan 14, 2024
1 parent 81c42cc commit 74b6b1b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pebble.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
6 changes: 3 additions & 3 deletions pebble_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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,
Expand Down

0 comments on commit 74b6b1b

Please sign in to comment.