aboutsummaryrefslogtreecommitdiff
path: root/cmd/bolt/bench.go
diff options
context:
space:
mode:
authorBen Johnson <benbjohnson@yahoo.com>2014-05-15 14:04:57 -0600
committerBen Johnson <benbjohnson@yahoo.com>2014-05-15 14:04:57 -0600
commita1873dd6f65654d463455ae2d381c35c12f71f51 (patch)
tree4b5b5cff16a08bbeebe0e7c2909eaf003cf90ec2 /cmd/bolt/bench.go
parentMerge pull request #165 from benbjohnson/strict-mode (diff)
downloaddedo-a1873dd6f65654d463455ae2d381c35c12f71f51.tar.gz
dedo-a1873dd6f65654d463455ae2d381c35c12f71f51.tar.xz
Add option to adjust fill percentage.
This commit adds the ability to adjust the fill percentage for splitting nodes. This works by setting a threshold that is a percentage of a total page size. When that threshold is crossed during a split then a new node is created. This is primarily beneficial for append-only workloads. Fixes #163.
Diffstat (limited to 'cmd/bolt/bench.go')
-rw-r--r--cmd/bolt/bench.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd/bolt/bench.go b/cmd/bolt/bench.go
index e8bf376..6379144 100644
--- a/cmd/bolt/bench.go
+++ b/cmd/bolt/bench.go
@@ -46,6 +46,7 @@ func Bench(options *BenchOptions) {
fatal(err)
return
}
+ db.FillPercent = options.FillPercent
defer db.Close()
// Enable streaming stats.
@@ -280,6 +281,7 @@ type BenchOptions struct {
MemProfile string
BlockProfile string
StatsInterval time.Duration
+ FillPercent float64
Clean bool
}