Skip to content

Commit

Permalink
Merge pull request #107 from soramitsu/scenarious/add-transfer-asset-scn
Browse files Browse the repository at this point in the history
update transfer_asset scn
  • Loading branch information
timofeevmd authored Jul 4, 2024
2 parents 38e12e9 + 2c1cca2 commit b30ed07
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
11 changes: 6 additions & 5 deletions src/test/java/Configs/LoadProfile.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

import io.gatling.javaapi.core.OpenInjectionStep;

import static io.gatling.javaapi.core.CoreDsl.incrementUsersPerSec;
import static io.gatling.javaapi.core.CoreDsl.rampUsers;
import static io.gatling.javaapi.core.CoreDsl.*;

public class LoadProfile {
public static OpenInjectionStep getMaxPerformanceOpenProfile() {
Expand All @@ -14,8 +13,10 @@ public static OpenInjectionStep getMaxPerformanceOpenProfile() {
.startingFrom(Integer.parseInt(System.getProperty("startingFrom")));//20
}

public static OpenInjectionStep getMaxPerformance() {
return rampUsers(Integer.parseInt(System.getProperty("intensity")))
.during(Long.parseLong(System.getProperty("rampDuration")));
public static OpenInjectionStep[] getMaxPerformance() {
return new OpenInjectionStep[]{
rampUsers(Integer.parseInt(System.getProperty("intensity"))).during(Long.parseLong(System.getProperty("rampDuration")))
, constantUsersPerSec(Integer.parseInt(System.getProperty("intensity"))).during(Long.parseLong(System.getProperty("maxDuration")) - Long.parseLong(System.getProperty("rampDuration")))
};
}
}
4 changes: 2 additions & 2 deletions src/test/java/requests/Transactions.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class Transactions extends Constants {
}
)
)
);
).exec(http("tx_register_domain_status").get(Constants.URL_STATUS).check(status().is(200)));;

public static ChainBuilder postTransferAsset = exec(feed(CSV_FEEDER)).exec(feed(PEERS_FEEDER))
.exec(
Expand All @@ -50,5 +50,5 @@ public class Transactions extends Constants {
}
)
)
);
).exec(http("tx_register_domain_status").get(Constants.URL_STATUS).check(status().is(200)));
}
4 changes: 2 additions & 2 deletions src/test/java/scenarious/TransferAsset.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public class TransferAsset {
public static ScenarioBuilder transferAsset = scenario("transfer asset")
.feed(csv("preconditionList.csv").circular())
.exec(
Transactions.postTransferAsset/*,
Transactions.postTransferAsset,
Transactions.postTransferAsset,
Transactions.postTransferAsset,
Expand Down Expand Up @@ -909,7 +910,6 @@ public class TransferAsset {
Transactions.postTransferAsset,
Transactions.postTransferAsset,
Transactions.postTransferAsset,
Transactions.postTransferAsset,
Transactions.postTransferAsset
Transactions.postTransferAsset*/
);
}
6 changes: 3 additions & 3 deletions src/test/resources/gatling.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ gatling {
#rawFileBodiesInMemoryMaxSize = 10240 # Max bite size of raw files to be cached in memory
#pebbleFileBodiesCacheMaxCapacity = 200 # Cache size for request body Pebble templates, set to 0 to disable
#feederAdaptiveLoadModeThreshold = 100 # File size threshold (in MB). Below load eagerly in memory, above use batch mode with default buffer size
#shutdownTimeout = 30000 # Milliseconds to wait for the actor system to shutdown
#shutdownTimeout = 60000 # Milliseconds to wait for the actor system to shutdown
extract {
regex {
#cacheMaxCapacity = 200 # Cache size for the compiled regexes, set to 0 to disable caching
Expand All @@ -29,7 +29,7 @@ gatling {
}
}
socket {
#connectTimeout = 10000 # Timeout in millis for establishing a TCP socket
#connectTimeout = 60000 # Timeout in millis for establishing a TCP socket
#tcpNoDelay = true
#soKeepAlive = false # if TCP keepalive configured at OS level should be used
#soReuseAddress = false
Expand All @@ -43,7 +43,7 @@ gatling {
ssl {
#useOpenSsl = true # if OpenSSL should be used instead of JSSE (only the latter can be debugged with -Djavax.net.debug=ssl)
#useOpenSslFinalizers = false # if OpenSSL contexts should be freed with Finalizer or if using RefCounted is fine
#handshakeTimeout = 10000 # TLS handshake timeout in millis
#handshakeTimeout = 30000 # TLS handshake timeout in millis
#useInsecureTrustManager = true # Use an insecure TrustManager that trusts all server certificates
#enabledProtocols = [] # Array of enabled protocols for HTTPS, if empty use Netty's defaults
#enabledCipherSuites = [] # Array of enabled cipher suites for HTTPS, if empty enable all available ciphers
Expand Down

0 comments on commit b30ed07

Please sign in to comment.