Skip to content

Commit

Permalink
new flag to tweak max requests per connection
Browse files Browse the repository at this point in the history
closes #121
  • Loading branch information
rustyrazorblade committed Nov 19, 2019
1 parent 1878399 commit 747ec74
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/kotlin/com/thelastpickle/tlpstress/commands/Run.kt
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ class Run(val command: String) : IStressCommand {

val log = logger()

@Parameter(names = ["--max-requests"], description = "Sets the max requests per connection")
var maxRequestsPerConnection : Int = 32768

/**
* Lazily generate query options
*/
Expand All @@ -172,8 +175,8 @@ class Run(val command: String) : IStressCommand {
.withPoolingOptions(PoolingOptions()
.setConnectionsPerHost(HostDistance.LOCAL, 4, 8)
.setConnectionsPerHost(HostDistance.REMOTE, 4, 8)
.setMaxRequestsPerConnection(HostDistance.LOCAL, 32768)
.setMaxRequestsPerConnection(HostDistance.REMOTE, 2000))
.setMaxRequestsPerConnection(HostDistance.LOCAL, maxRequestsPerConnection)
.setMaxRequestsPerConnection(HostDistance.REMOTE, maxRequestsPerConnection))
if(ssl) {
builder = builder.withSSL()
}
Expand Down

0 comments on commit 747ec74

Please sign in to comment.