Skip to content

Commit

Permalink
adding put, post flags
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerwelin committed Jan 27, 2020
1 parent b41606a commit 61f3f32
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
8 changes: 8 additions & 0 deletions cmd/cassowary/cli.go
Expand Up @@ -233,6 +233,14 @@ func runCLI(args []string) {
Usage: "number of requests to perform",
Required: true,
},
cli.StringFlag{
Name: "postfile",
Usage: "File containing data to POST (content type will default to application/json)",
},
cli.StringFlag{
Name: "putfile",
Usage: "File containig data to PUT (content type will default to application/json)",
},
cli.IntFlag{
Name: "t, timeout",
Usage: "http client timeout",
Expand Down
10 changes: 5 additions & 5 deletions pkg/client/load.go
Expand Up @@ -134,11 +134,11 @@ func (c *Cassowary) Coordinate() (ResultMetrics, error) {
c.Client = &http.Client{
Timeout: time.Second * time.Duration(c.Timeout),
Transport: &http.Transport{
MaxIdleConns: 300,
MaxIdleConnsPerHost: 300,
MaxConnsPerHost: 300,
DisableCompression: false,
DisableKeepAlives: c.DisableKeepAlive,
//MaxIdleConns: 300,
MaxIdleConnsPerHost: 10000,
//MaxConnsPerHost: 300,
DisableCompression: false,
DisableKeepAlives: c.DisableKeepAlive,
},
}

Expand Down

0 comments on commit 61f3f32

Please sign in to comment.