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.go20
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
}