aboutsummaryrefslogtreecommitdiff
path: root/cmd/bolt/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/bolt/main.go')
-rw-r--r--cmd/bolt/main.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmd/bolt/main.go b/cmd/bolt/main.go
index 719bf00..cab4e0e 100644
--- a/cmd/bolt/main.go
+++ b/cmd/bolt/main.go
@@ -100,11 +100,17 @@ func NewApp() *cli.App {
&cli.IntFlag{Name: "count", Value: 1000, Usage: "Item count"},
&cli.IntFlag{Name: "key-size", Value: 8, Usage: "Key size"},
&cli.IntFlag{Name: "value-size", Value: 32, Usage: "Value size"},
+ &cli.IntFlag{Name: "batch-size", Value: 0, Usage: "Write batch size"},
&cli.StringFlag{Name: "cpuprofile", Usage: "CPU profile output path"},
&cli.StringFlag{Name: "memprofile", Usage: "Memory profile output path"},
&cli.StringFlag{Name: "blockprofile", Usage: "Block profile output path"},
+ &cli.BoolFlag{Name: "stats", Usage: "Output storage and transaction stats"},
},
Action: func(c *cli.Context) {
+ bs := c.Int("batch-size")
+ if bs == 0 {
+ bs = c.Int("count")
+ }
Bench(&BenchOptions{
ProfileMode: c.String("profile-mode"),
WriteMode: c.String("write-mode"),
@@ -112,9 +118,11 @@ func NewApp() *cli.App {
Iterations: c.Int("count"),
KeySize: c.Int("key-size"),
ValueSize: c.Int("value-size"),
+ BatchSize: bs,
CPUProfile: c.String("cpuprofile"),
MemProfile: c.String("memprofile"),
BlockProfile: c.String("blockprofile"),
+ Stats: c.Bool("stats"),
})
},
}}