Skip to content

Commit

Permalink
update client connection
Browse files Browse the repository at this point in the history
Signed-off-by: timofeevmd <[email protected]>
  • Loading branch information
timofeevmd committed Nov 13, 2023
1 parent 2cc1fbd commit 04e8520
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/main/kotlin/jp/co/soramitsu/load/Iroha2SetUp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ class Iroha2SetUp : Wrench13() {

val iroha2SetUpScn = scenario("Iroha2SetUp")
.exec { Session ->
val randomIndex = (0 until peers.size).random()
/*val randomIndex = (0 until peers.size).random()
val randomPeer = peers[randomIndex]
Iroha2Client = buildClient(randomPeer)
Iroha2Client = buildClient(randomPeer)*/

timer = CustomHistogram.subscriptionToBlockStreamTimer.labels(
"gatling"
Expand Down Expand Up @@ -92,9 +92,9 @@ class Iroha2SetUp : Wrench13() {
//accounts on each domain = threads * anotherDevDomainIdList.size * setUpUsersOnEachDomain
repeat(SimulationConfig.simulation.setUpUsersOnEachDomain).on(
exec { Session ->
val randomIndex = (0 until peers.size).random()
/*val randomIndex = (0 until peers.size).random()
val randomPeer = peers[randomIndex]
Iroha2Client = buildClient(randomPeer)
Iroha2Client = buildClient(randomPeer)*/
timer = CustomHistogram.subscriptionToBlockStreamTimer.labels(
"gatling"
, System.getProperty("user.dir").substringAfterLast("/").substringAfterLast("\\")
Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/jp/co/soramitsu/load/TransactionOnly.kt
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ class TransactionOnly: Wrench13() {
Session
}
.exec { Session ->
val randomIndex = (0 until peers.size).random()
/*val randomIndex = (0 until peers.size).random()
val randomPeer = peers[randomIndex]
val Iroha2Client: Iroha2Client = buildClient(randomPeer)
val Iroha2Client: Iroha2Client = buildClient(randomPeer)*/
timer = CustomHistogram.subscriptionToBlockStreamTimer.labels(
"gatling",
System.getProperty("user.dir").substringAfterLast("/").substringAfterLast("\\"),
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/jp/co/soramitsu/load/toolbox/Wrench13.kt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ open class Wrench13 {
var attemptsPersentage: Int = 2
var attempt: Int = -1
var anotherDevDomainIdList: MutableList<DomainId> = mutableListOf()
lateinit var Iroha2Client: Iroha2Client
var Iroha2Client: Iroha2Client = buildClient("peer-0/api")


var pushGateway = PushGateway("0.0.0.0:9091");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class MaximumSearchSimulation extends Simulation {
setUp(
jp.co.soramitsu.load.SetUp.Companion.apply().injectOpen(OpenInjectionStep.atOnceUsers(1))
.andThen(Iroha2SetUp.Companion.apply().injectOpen(LoadProfiles.setupModel())
.andThen(TransferAssetsQueryStatus.Companion.apply().injectClosed(LoadProfiles.getMaxPerformanceClosedProfile()))
.andThen(TransactionOnly.Companion.apply().injectClosed(LoadProfiles.getMaxPerformanceClosedProfile()))
).andThen(CleanUp.Companion.apply().injectOpen(OpenInjectionStep.atOnceUsers(1)))
).protocols(Protocols.httpProtocol);
}
Expand Down

0 comments on commit 04e8520

Please sign in to comment.