Add flag to specify db and clarify flag descriptions

pull/5239/head
Michael Desa 2015-12-29 11:31:28 -08:00
parent 86f433b2ab
commit ebd9b9978e
2 changed files with 8 additions and 1 deletions

View File

@ -12,6 +12,7 @@ import (
var (
config = flag.String("config", "", "The stress test file")
cpuprofile = flag.String("cpuprofile", "", "Write the cpu profile to `filename`")
db = flag.String("db", "", "name of the database where the stress test will take place")
)
func main() {
@ -34,6 +35,12 @@ func main() {
return
}
if *db != "" {
c.Provision.Basic.Database = *db
c.Write.InfluxClients.Basic.Database = *db
c.Read.QueryClients.Basic.Database = *db
}
w := stress.NewWriter(&c.Write.PointGenerators.Basic, &c.Write.InfluxClients.Basic)
r := stress.NewQuerier(&c.Read.QueryGenerators.Basic, &c.Read.QueryClients.Basic)
s := stress.NewStressTest(&c.Provision.Basic, w, r)

View File

@ -113,7 +113,7 @@ func NewOutputConfig() *outputConfig {
var o outputConfig
tags := make(map[string]string)
o.tags = tags
database := flag.String("database", "stress", "name of database")
database := flag.String("database", "stress", "name of database where the response times will persist")
address := flag.String("addr", "http://localhost:8086", "IP address and port of database where response times will persist (e.g., localhost:8086)")
flag.Var(&o, "tags", "A comma seperated list of tags")
flag.Parse()