diff options
author | Steven Normore <snormore@gmail.com> | 2014-04-09 11:40:46 +0000 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2014-04-18 21:44:27 -0500 |
commit | 6957c9d534c155e5df8d4fa3191056eba6840a08 (patch) | |
tree | 53cb6084fc85157a90ecbec80eb1e0b3efd5f74f /cmd/bolt/main.go | |
parent | Merge pull request #131 from benbjohnson/cursor-bucket (diff) | |
download | dedo-6957c9d534c155e5df8d4fa3191056eba6840a08.tar.gz dedo-6957c9d534c155e5df8d4fa3191056eba6840a08.tar.xz |
initial bench and generate command structure
Diffstat (limited to 'cmd/bolt/main.go')
-rw-r--r-- | cmd/bolt/main.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/cmd/bolt/main.go b/cmd/bolt/main.go index 1930e7d..009bdc5 100644 --- a/cmd/bolt/main.go +++ b/cmd/bolt/main.go @@ -6,6 +6,7 @@ import ( "fmt" "log" "os" + "strconv" "github.com/codegangsta/cli" ) @@ -90,6 +91,25 @@ func NewApp() *cli.App { Check(path) }, }, + { + Name: "generate", + Usage: "Generate data for benchmarks", + Action: func(c *cli.Context) { + numEvents, err := strconv.Atoi(c.Args().Get(0)) + if err != nil { + fatal(err) + } + destPath := c.Args().Get(1) + Generate(numEvents, destPath) + }, + }, + { + Name: "bench", + Usage: "Run benchmarks on a given dataset", + Action: func(c *cli.Context) { + Bench() + }, + }, } return app } |