aboutsummaryrefslogtreecommitdiff
path: root/cmd/bolt
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/bolt')
-rw-r--r--cmd/bolt/bench.go2
-rw-r--r--cmd/bolt/main.go3
2 files changed, 5 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
}
diff --git a/cmd/bolt/main.go b/cmd/bolt/main.go
index 66c33d2..44ba5a1 100644
--- a/cmd/bolt/main.go
+++ b/cmd/bolt/main.go
@@ -8,6 +8,7 @@ import (
"os"
"time"
+ "github.com/boltdb/bolt"
"github.com/codegangsta/cli"
)
@@ -114,6 +115,7 @@ func NewApp() *cli.App {
&cli.StringFlag{Name: "memprofile", Usage: "Memory profile output path"},
&cli.StringFlag{Name: "blockprofile", Usage: "Block profile output path"},
&cli.StringFlag{Name: "stats-interval", Value: "0s", Usage: "Continuous stats interval"},
+ &cli.Float64Flag{Name: "fill-percent", Value: bolt.DefaultFillPercent, Usage: "Fill percentage"},
&cli.BoolFlag{Name: "work", Usage: "Print the temp db and do not delete on exit"},
},
Action: func(c *cli.Context) {
@@ -134,6 +136,7 @@ func NewApp() *cli.App {
MemProfile: c.String("memprofile"),
BlockProfile: c.String("blockprofile"),
StatsInterval: statsInterval,
+ FillPercent: c.Float64("fill-percent"),
Clean: !c.Bool("work"),
})
},