Add flag to specify db and clarify flag descriptions
parent
86f433b2ab
commit
ebd9b9978e
|
@ -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)
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue