Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
260 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,6 @@ | |
/target | ||
|
||
.metadata | ||
bin/ | ||
tmp/ | ||
*.tmp | ||
*.bak | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
@ECHO OFF | ||
@REM | ||
@REM Copyright 2011-2017 GatlingCorp (http://gatling.io) | ||
@REM | ||
@REM Licensed under the Apache License, Version 2.0 (the "License"); | ||
@REM you may not use this file except in compliance with the License. | ||
@REM You may obtain a copy of the License at | ||
@REM | ||
@REM http://www.apache.org/licenses/LICENSE-2.0 | ||
@REM | ||
@REM Unless required by applicable law or agreed to in writing, software | ||
@REM distributed under the License is distributed on an "AS IS" BASIS, | ||
@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
@REM See the License for the specific language governing permissions and | ||
@REM limitations under the License. | ||
@REM | ||
|
||
setlocal | ||
|
||
set USER_ARGS=%* | ||
|
||
rem set GATLING_HOME automatically if possible | ||
set "OLD_DIR=%cd%" | ||
cd .. | ||
set "DEFAULT_GATLING_HOME=%cd%" | ||
cd %OLD_DIR% | ||
|
||
rem if gatling home is correctly set | ||
if exist "%GATLING_HOME%\bin\gatling.bat" goto gotHome | ||
rem if gatling home is not correctly set | ||
if not "%GATLING_HOME%" == "" goto badHome | ||
rem if not try current folder | ||
if exist "%OLD_DIR%\bin\gatling.bat" set "GATLING_HOME=%OLD_DIR%" && goto gotHome | ||
rem if not try parent folder | ||
if exist "%DEFAULT_GATLING_HOME%\bin\gatling.bat" set "GATLING_HOME=%DEFAULT_GATLING_HOME%" && goto gotHome | ||
rem else tell user to set GATLING_HOME | ||
goto :noHome | ||
|
||
:gotHome | ||
|
||
if not defined GATLING_CONF set GATLING_CONF="%GATLING_HOME%"\conf | ||
|
||
echo GATLING_HOME is set to "%GATLING_HOME%" | ||
|
||
set JAVA_OPTS=-Xmx1G -XX:+UseG1GC -XX:MaxGCPauseMillis=30 -XX:G1HeapRegionSize=16m -XX:InitiatingHeapOccupancyPercent=75 -XX:+ParallelRefProcEnabled -XX:+PerfDisableSharedMem -XX:+AggressiveOpts -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv6Addresses=false %JAVA_OPTS% | ||
|
||
if "%PROCESSOR_ARCHITECTURE%" == "x86" if "%PROCESSOR_ARCHITEW6432%" == "" goto skipServer | ||
set JAVA_OPTS=-server -XX:+OptimizeStringConcat %JAVA_OPTS% | ||
|
||
:skipServer | ||
set COMPILER_OPTS=-Xss100M %JAVA_OPTS% | ||
rem Setup classpaths | ||
set COMPILER_CLASSPATH="%GATLING_HOME%"\lib\*;%GATLING_CONF%; | ||
set GATLING_CLASSPATH="%GATLING_HOME%"\lib\*;"%GATLING_HOME%"\user-files;%GATLING_CONF%; | ||
|
||
set JAVA=java | ||
if exist "%JAVA_HOME%\bin\java.exe" goto setJavaHome | ||
goto run | ||
|
||
:setJavaHome | ||
set JAVA="%JAVA_HOME%\bin\java.exe" | ||
|
||
:run | ||
echo JAVA = "%JAVA%" | ||
rem Run the compiler | ||
%JAVA% %COMPILER_OPTS% -cp %COMPILER_CLASSPATH% io.gatling.compiler.ZincCompiler %USER_ARGS% 2>NUL | ||
rem Run Gatling | ||
%JAVA% %JAVA_OPTS% -cp %GATLING_CLASSPATH% io.gatling.app.Gatling %USER_ARGS% | ||
if %errorlevel% neq 0 exit /b %errorlevel% | ||
rem The above line will forward any potential exit codes from Java if Gatling failed | ||
|
||
goto exit | ||
|
||
:badHome | ||
echo The GATLING_HOME environment variable points to the wrong directory. | ||
echo Please set it to the correct folder and try to launch Gatling again. | ||
goto exit | ||
|
||
:noHome | ||
echo GATLING_HOME environment variable is not set and could not be guessed automatically. | ||
echo Please set GATLING_HOME and try to launch Gatling again. | ||
goto exit | ||
|
||
:exit | ||
if not defined NO_PAUSE pause | ||
endlocal | ||
exit /b 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/bin/sh | ||
# | ||
# Copyright 2011-2017 GatlingCorp (http://gatling.io) | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
if [ -n "$JAVA_HOME" ]; then | ||
JAVA="$JAVA_HOME"/bin/java | ||
else | ||
JAVA=java | ||
fi | ||
|
||
OLDDIR=`pwd` | ||
BIN_DIR=`dirname $0` | ||
cd "${BIN_DIR}/.." && DEFAULT_GATLING_HOME=`pwd` && cd "${OLDDIR}" | ||
|
||
GATLING_HOME="${GATLING_HOME:=${DEFAULT_GATLING_HOME}}" | ||
GATLING_CONF="${GATLING_CONF:=$GATLING_HOME/conf}" | ||
|
||
export GATLING_HOME GATLING_CONF | ||
|
||
echo "GATLING_HOME is set to ${GATLING_HOME}" | ||
|
||
DEFAULT_JAVA_OPTS="-server" | ||
DEFAULT_JAVA_OPTS="${DEFAULT_JAVA_OPTS} -Xmx1G -XX:+HeapDumpOnOutOfMemoryError" | ||
DEFAULT_JAVA_OPTS="${DEFAULT_JAVA_OPTS} -XX:+UseG1GC -XX:MaxGCPauseMillis=30 -XX:G1HeapRegionSize=16m -XX:InitiatingHeapOccupancyPercent=75 -XX:+ParallelRefProcEnabled" | ||
DEFAULT_JAVA_OPTS="${DEFAULT_JAVA_OPTS} -XX:+PerfDisableSharedMem -XX:+AggressiveOpts -XX:+OptimizeStringConcat" | ||
DEFAULT_JAVA_OPTS="${DEFAULT_JAVA_OPTS} -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv6Addresses=false" | ||
COMPILER_OPTS="-Xss100M $DEFAULT_JAVA_OPTS $JAVA_OPTS" | ||
|
||
# Setup classpaths | ||
COMPILER_CLASSPATH="$GATLING_HOME/lib/*:$GATLING_CONF:" | ||
GATLING_CLASSPATH="$GATLING_HOME/lib/*:$GATLING_HOME/user-files:$GATLING_CONF:" | ||
|
||
|
||
# Use the extra compiler options flag only if they are provided | ||
if [ -n "$EXTRA_SCALAC_OPTIONS" ]; then | ||
EXTRA_COMPILER_OPTIONS="-eso $EXTRA_SCALAC_OPTIONS" | ||
fi | ||
|
||
# Run the compiler | ||
"$JAVA" $COMPILER_OPTS -cp "$COMPILER_CLASSPATH" io.gatling.compiler.ZincCompiler $EXTRA_COMPILER_OPTIONS "$@" 2> /dev/null | ||
# Run Gatling | ||
"$JAVA" $DEFAULT_JAVA_OPTS $JAVA_OPTS -cp "$GATLING_CLASSPATH" io.gatling.app.Gatling "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
@ECHO OFF | ||
@REM | ||
@REM Copyright 2011-2016 GatlingCorp (http://gatling.io) | ||
@REM | ||
@REM Licensed under the Apache License, Version 2.0 (the "License"); | ||
@REM you may not use this file except in compliance with the License. | ||
@REM You may obtain a copy of the License at | ||
@REM | ||
@REM http://www.apache.org/licenses/LICENSE-2.0 | ||
@REM | ||
@REM Unless required by applicable law or agreed to in writing, software | ||
@REM distributed under the License is distributed on an "AS IS" BASIS, | ||
@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
@REM See the License for the specific language governing permissions and | ||
@REM limitations under the License. | ||
@REM | ||
|
||
setlocal | ||
|
||
rem set GATLING_HOME automatically if possible | ||
set "OLD_DIR=%cd%" | ||
cd .. | ||
set "DEFAULT_GATLING_HOME=%cd%" | ||
cd %OLD_DIR% | ||
|
||
rem if gatling home is correctly set | ||
if exist "%GATLING_HOME%\bin\gatling.bat" goto gotHome | ||
rem if gatling home is not correctly set | ||
if not "%GATLING_HOME%" == "" goto badHome | ||
rem if not try current folder | ||
if exist "%OLD_DIR%\bin\gatling.bat" set "GATLING_HOME=%OLD_DIR%" && goto gotHome | ||
rem if not try parent folder | ||
if exist "%DEFAULT_GATLING_HOME%\bin\gatling.bat" set "GATLING_HOME=%DEFAULT_GATLING_HOME%" && goto gotHome | ||
rem else tell user to set GATLING_HOME | ||
goto :noHome | ||
|
||
:gotHome | ||
|
||
echo GATLING_HOME is set to "%GATLING_HOME%" | ||
|
||
set JAVA_OPTS=-Xms512M -Xmx512M -Xmn100M %JAVA_OPTS% | ||
|
||
set CLASSPATH="%GATLING_HOME%"\lib\*;"%GATLING_HOME%"\conf;%JAVA_CLASSPATH% | ||
set COMMAND=-cp %CLASSPATH% io.gatling.recorder.GatlingRecorder | ||
|
||
set JAVA=java | ||
if exist "%JAVA_HOME%\bin\java.exe" goto setJavaHome | ||
goto run | ||
|
||
:setJavaHome | ||
set JAVA="%JAVA_HOME%\bin\java.exe" | ||
|
||
:run | ||
echo JAVA = "%JAVA%" | ||
|
||
%JAVA% %JAVA_OPTS% %COMMAND% %1 %2 %3 %4 %5 %6 %7 %8 %9 | ||
|
||
goto exit | ||
|
||
|
||
:badHome | ||
echo The GATLING_HOME environnement variable points to the wrong directory. | ||
echo Please set it to the correct folder and try to launch Gatling again. | ||
goto exit | ||
|
||
:noHome | ||
echo GATLING_HOME environnement variable is not set and could not be guessed automatically. | ||
echo Please set GATLING_HOME and try to launch Gatling again. | ||
goto exit | ||
|
||
:exit | ||
pause | ||
endlocal | ||
exit /b 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
# | ||
# Copyright 2011-2016 GatlingCorp (http://gatling.io) | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
if [ -n "$JAVA_HOME" ]; then | ||
JAVA="$JAVA_HOME"/bin/java | ||
else | ||
JAVA=java | ||
fi | ||
|
||
OLDDIR=`pwd` | ||
BIN_DIR=`dirname $0` | ||
cd "${BIN_DIR}/.." && DEFAULT_GATLING_HOME=`pwd` && cd "${OLDDIR}" | ||
|
||
GATLING_HOME="${GATLING_HOME:=${DEFAULT_GATLING_HOME}}" | ||
GATLING_CONF="${GATLING_CONF:=$GATLING_HOME/conf}" | ||
|
||
export GATLING_HOME GATLING_CONF | ||
|
||
echo "GATLING_HOME is set to ${GATLING_HOME}" | ||
|
||
JAVA_OPTS="${JAVA_OPTS} -Xms512M -Xmx512M -Xmn100M" | ||
|
||
CLASSPATH="$GATLING_HOME/lib/*:$GATLING_CONF:${JAVA_CLASSPATH}" | ||
|
||
"$JAVA" $JAVA_OPTS -cp "$CLASSPATH" io.gatling.recorder.GatlingRecorder "$@" |