From 6957c9d534c155e5df8d4fa3191056eba6840a08 Mon Sep 17 00:00:00 2001 From: Steven Normore Date: Wed, 9 Apr 2014 11:40:46 +0000 Subject: initial bench and generate command structure --- cmd/bolt/main.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'cmd/bolt/main.go') 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 } -- cgit v1.2.3