aboutsummaryrefslogtreecommitdiff
path: root/cmd/bolt/main.go
diff options
context:
space:
mode:
authorBen Johnson <benbjohnson@yahoo.com>2014-04-30 12:00:39 -0600
committerBen Johnson <benbjohnson@yahoo.com>2014-04-30 12:00:39 -0600
commit2bfb1b3db56490d10951f104a892347d1a6db632 (patch)
tree682ce04dd86fdfe06f1cb0fc2b084c56c7bdaded /cmd/bolt/main.go
parentRemove bolt bench -stat. (diff)
parentAdd --batch-size to 'bolt bench'. (diff)
downloaddedo-2bfb1b3db56490d10951f104a892347d1a6db632.tar.gz
dedo-2bfb1b3db56490d10951f104a892347d1a6db632.tar.xz
Merge branch 'bench-batch' into moar_bench
Conflicts: cmd/bolt/bench.go
Diffstat (limited to 'cmd/bolt/main.go')
-rw-r--r--cmd/bolt/main.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/cmd/bolt/main.go b/cmd/bolt/main.go
index 041f4bb..cb2d47a 100644
--- a/cmd/bolt/main.go
+++ b/cmd/bolt/main.go
@@ -98,26 +98,22 @@ func NewApp() *cli.App {
&cli.StringFlag{Name: "write-mode", Value: "seq", Usage: "Write mode"},
&cli.StringFlag{Name: "read-mode", Value: "seq", Usage: "Read mode"},
&cli.IntFlag{Name: "count", Value: 1000, Usage: "Item count"},
+ &cli.IntFlag{Name: "batch-size", Usage: "Write batch size"},
&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"},
},
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"),
ReadMode: c.String("read-mode"),
Iterations: c.Int("count"),
+ BatchSize: c.Int("batch-size"),
KeySize: c.Int("key-size"),
ValueSize: c.Int("value-size"),
- BatchSize: bs,
CPUProfile: c.String("cpuprofile"),
MemProfile: c.String("memprofile"),
BlockProfile: c.String("blockprofile"),