Skip to content

Commit

Permalink
Add flag to specify db and clarify flag descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
desa committed Dec 29, 2015
1 parent 86f433b commit ebd9b99
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions cmd/influx_stress/influx_stress.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion stress/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit ebd9b99

Please sign in to comment.