stress testing
wget https://services.gradle.org/distributions/gradle-2.4-bin.zip
/opt/gradle-2.4/bin
#./bashrc
export GRADLE_HOME=/opt/gradle-2.4
export PATH=$PATH:$GRADLE_HOME/bin
Para resolver o problema java.net.ConnectException: Cannot assign requested address
, na maquina do gatling:
sudo sysctl -w net.ipv4.ip_local_port_range="1025 65535"
echo 300000 | sudo tee /proc/sys/fs/nr_open
echo 300000 | sudo tee /proc/sys/fs/file-max
em /etc/security/limits.conf
tem que ter o seguinte conteudo
soft nofile 65535
hard nofile 65535
editar sudo vim conf/logback.xml
:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%-5level] %logger{15} - %msg%n%rEx</pattern>
<immediateFlush>false</immediateFlush>
</encoder>
</appender>
<!-- Uncomment for logging ALL HTTP request and responses -->
<!-- <logger name="io.gatling.http.ahc" level="TRACE" /> -->
<!-- <logger name="io.gatling.http.response" level="TRACE" /> -->
<!-- Uncomment for logging ONLY FAILED HTTP request and responses -->
<logger name="io.gatling.http.ahc" level="DEBUG" />
<logger name="io.gatling.http.response" level="DEBUG" />
<root level="WARN">
<appender-ref ref="CONSOLE" />
</root>
</configuration>
https://github.com/gatling/gatling/blob/master/src/sphinx/general/operations.rst
val httpConf = http
.baseURL("http://IP:9200")
.acceptHeader("text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8")
.doNotTrackHeader("1")
.acceptLanguageHeader("en-US,en;q=0.5")
.acceptEncodingHeader("gzip, deflate")
.userAgentHeader("Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:16.0) Gecko/20100101 Firefox/16.0")
.shareConnections
pre-tunning: https://github.com/gatling/gatling/blob/master/src/sphinx/general/operations.rst
.shareConnections does the magic! https://groups.google.com/forum/#!topic/gatling/rRpv8LPa51I