aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/bolt/bench.go2
-rw-r--r--cmd/bolt/main.go2
2 files changed, 4 insertions, 0 deletions
diff --git a/cmd/bolt/bench.go b/cmd/bolt/bench.go
index 7eb503d..a3aa9b8 100644
--- a/cmd/bolt/bench.go
+++ b/cmd/bolt/bench.go
@@ -46,6 +46,7 @@ func Bench(options *BenchOptions) {
fatal(err)
return
}
+ db.NoSync = options.NoSync
db.FillPercent = options.FillPercent
defer db.Close()
@@ -363,6 +364,7 @@ type BenchOptions struct {
BlockProfile string
StatsInterval time.Duration
FillPercent float64
+ NoSync bool
Clean bool
}
diff --git a/cmd/bolt/main.go b/cmd/bolt/main.go
index a79302d..95bd813 100644
--- a/cmd/bolt/main.go
+++ b/cmd/bolt/main.go
@@ -118,6 +118,7 @@ func NewApp() *cli.App {
&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: "no-sync", Usage: "Skip fsync on every commit"},
&cli.BoolFlag{Name: "work", Usage: "Print the temp db and do not delete on exit"},
},
Action: func(c *cli.Context) {
@@ -139,6 +140,7 @@ func NewApp() *cli.App {
BlockProfile: c.String("blockprofile"),
StatsInterval: statsInterval,
FillPercent: c.Float64("fill-percent"),
+ NoSync: c.Bool("no-sync"),
Clean: !c.Bool("work"),
})
},