jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject svn commit: r1823224 - in /jmeter/trunk: bin/jmeter bin/jmeter.bat xdocs/usermanual/get-started.xml
Date Mon, 05 Feb 2018 18:15:22 GMT
Author: fschumacher
Date: Mon Feb  5 18:15:22 2018
New Revision: 1823224

URL: http://svn.apache.org/viewvc?rev=1823224&view=rev
Log:
Try to use the same variables to control the startup of JMeter on Windows and Unix.

Modified:
    jmeter/trunk/bin/jmeter
    jmeter/trunk/bin/jmeter.bat
    jmeter/trunk/xdocs/usermanual/get-started.xml

Modified: jmeter/trunk/bin/jmeter
URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/jmeter?rev=1823224&r1=1823223&r2=1823224&view=diff
==============================================================================
--- jmeter/trunk/bin/jmeter (original)
+++ jmeter/trunk/bin/jmeter Mon Feb  5 18:15:22 2018
@@ -33,11 +33,11 @@
 ##                    are both empty, JMeter will try to guess JAVA_HOME.
 ##                    If JRE_HOME and JAVA_HOME are both set, JAVA_HOME is used.
 ##
-##   JMETER_GC_ALGO   (Optional) Java runtime options to specify JVM garbage collection
+##   GC_ALGO          (Optional) Java runtime options to specify JVM garbage collection
 ##                    algorithm
 ##                    Defaults to "-XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:G1ReservePercent=20"
 ##
-##   HEAP      (Optional) Java runtime options for memory management
+##   HEAP             (Optional) Java runtime options for memory management
 ##                    used when JMeter is started.
 ##                    Defaults to "-Xms1g -Xmx1g -X:MaxMetaspaceSize=256m"
 ##
@@ -175,7 +175,7 @@ esac
 # Finally, some tracing to help in case things go astray:
 # You may want to add those settings:
 # -XX:+ParallelRefProcEnabled -XX:+PerfDisableSharedMem
-: "${JMETER_GC_ALGO:="-XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:G1ReservePercent=20"}"
+: "${GC_ALGO:="-XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:G1ReservePercent=20"}"
 
 
 # Always dump on OOM (does not cost anything unless triggered)
@@ -184,7 +184,7 @@ SYSTEM_PROPS="-Djava.security.egd=file:/
 SERVER="-server"
 
 if [ -z "${JMETER_COMPLETE_ARGS}" ]; then
-    ARGS="$JAVA9_OPTS $SERVER $DUMP $HEAP $VERBOSE_GC $JMETER_GC_ALGO $SYSTEM_PROPS $JMETER_LANGUAGE
$RUN_IN_DOCKER"
+    ARGS="$JAVA9_OPTS $SERVER $DUMP $HEAP $VERBOSE_GC $GC_ALGO $SYSTEM_PROPS $JMETER_LANGUAGE
$RUN_IN_DOCKER"
 else
     ARGS=""
 fi

Modified: jmeter/trunk/bin/jmeter.bat
URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/jmeter.bat?rev=1823224&r1=1823223&r2=1823224&view=diff
==============================================================================
--- jmeter/trunk/bin/jmeter.bat (original)
+++ jmeter/trunk/bin/jmeter.bat Mon Feb  5 18:15:22 2018
@@ -26,6 +26,9 @@ rem                 e.g. '-Dsun.java2d.d
 rem
 rem   JMETER_BIN  - JMeter bin directory (must end in \)
 rem
+rem   JMETER_COMPLETE_ARGS - if set indicates that JVM_ARGS is to be used exclusively instead
+rem                 of adding other options like HEAP or GC_ALGO
+rem
 rem   JMETER_HOME - installation directory. Will be guessed from location of jmeter.bat
 rem
 rem   JM_LAUNCH   - java.exe (default) or javaw.exe
@@ -65,10 +68,10 @@ goto end
 rem Get standard environment variables
 if exist "%JMETER_HOME%\bin\setenv.bat" call "%JMETER_HOME%\bin\setenv.bat"
 
-if not defined JVM_ARGS (
+if not defined JMETER_LANGUAGE (
     rem Set language
     rem Default to en_EN
-    set JVM_ARGS=-Duser.language="en" -Duser.region="EN"
+    set JMETER_LANGUAGE=-Duser.language="en" -Duser.region="EN"
 )
 
 rem Minimal version to run JMeter
@@ -177,9 +180,13 @@ if not defined DDRAW (
 )
 
 rem Collect the settings defined above
-set ARGS=%DUMP% %HEAP% %VERBOSE_GC% %GC_ALGO% %DDRAW% %SYSTEM_PROPS% %RUN_IN_DOCKER%
+if not defined JMETER_COMPLETE_ARGS (
+    set ARGS=%JAVA9_OPTS% %DUMP% %HEAP% %VERBOSE_GC% %GC_ALGO% %DDRAW% %SYSTEM_PROPS% %JMETER_LANGUAGE%
%RUN_IN_DOCKER%
+) else (
+    set ARGS=
+)
 
-%JM_START% %JM_LAUNCH% %JAVA9_OPTS% %ARGS% %JVM_ARGS% -jar "%JMETER_BIN%ApacheJMeter.jar"
%JMETER_CMD_LINE_ARGS%
+%JM_START% %JM_LAUNCH% %ARGS% %JVM_ARGS% -jar "%JMETER_BIN%ApacheJMeter.jar" %JMETER_CMD_LINE_ARGS%
 
 rem If the errorlevel is not zero, then display it and pause
 

Modified: jmeter/trunk/xdocs/usermanual/get-started.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/usermanual/get-started.xml?rev=1823224&r1=1823223&r2=1823224&view=diff
==============================================================================
--- jmeter/trunk/xdocs/usermanual/get-started.xml (original)
+++ jmeter/trunk/xdocs/usermanual/get-started.xml Mon Feb  5 18:15:22 2018
@@ -277,12 +277,14 @@ jmeter -t test.jmx …
 <p>The following environment variables can be defined:</p>
 <dl>
 <dt><code>DDRAW</code></dt><dd>JVM options to influence usage
of direct draw, e.g. <code>-Dsun.java2d.ddscale=true</code>. Default is empty.</dd>
+<dt><code>GC_ALGO</code></dt><dd>JVM garbage collector options.
Defaults to <code>-XX:+UseG1GC -XX:MaxGCPauseMillis=250 -XX:G1ReservePercent=20</code></dd>
+<dt><code>HEAP</code></dt><dd>JVM memory settings used when
starting JMeter. Defaults to <code>-Xms512m -Xmx512m -XX:MaxMetaspaceSize=256m</code></dd>
 <dt><code>JMETER_BIN</code></dt><dd>JMeter bin directory (must
end in <code>\</code>). Value will have been guessed, when <code>setenv.bat</code>
is called.</dd>
+<dt><code>JMETER_COMPLETE_ARGS</code></dt><dd>If set indicates,
that <code>JVM_ARGS</code> and <code>JMETER_OPTS</code> are to be
used, only. All other options like <code>HEAP</code> and <code>GC_ALGO</code>
will be ignored. Default is empty.</dd>
 <dt><code>JMETER_HOME</code></dt><dd>installation directory.
Will be guessed from location of <code>jmeter.bat</code></dd>
+<dt><code>JMETER_LANGUAGE</code></dt><dd>Java runtime options
to specify used languauge. Defaults to: <code>-Duser.language="en" -Duser.region="EN"</code></dd>
 <dt><code>JM_LAUNCH</code></dt><dd>Name of the java executable,
like <code>java.exe</code> (default) or <code>javaw.exe</code></dd>
-<dt><code>JVM_ARGS</code></dt><dd>Java options to be used when
starting JMeter. These will be added last to the java command. Defaults to: <code>-Duser.language="en"
-Duser.region="EN"</code></dd>
-<dt><code>GC_ALGO</code></dt><dd>JVM garbage collector options.
Defaults to <code>-XX:+UseG1GC -XX:MaxGCPauseMillis=250 -XX:G1ReservePercent=20</code></dd>
-<dt><code>HEAP</code></dt><dd>JVM memory settings used when
starting JMeter. Defaults to <code>-Xms512m -Xmx512m -XX:MaxMetaspaceSize=256m</code></dd>
+<dt><code>JVM_ARGS</code></dt><dd>Java options to be used when
starting JMeter. These will be added last to the java command. Default is empty</dd>
 </dl>
 
 <p>
@@ -321,13 +323,15 @@ export JMETER_LANGUAGE=" "
 
 <p>The following environment variables can be defined:</p>
 <dl>
-<dt><code>JAVA_HOME</code></dt><dd>Must point at your Java
Development Kit installation. Required to run the with the "<code>debug</code>"
argument. On some OSes it JMeter will try its best to guess the location of the JVM.</dd>
-<dt><code>JRE_HOME</code></dt><dd>Must point at your Java Runtime
installation. Defaults to <code>JAVA_HOME</code> if empty. If <code>JRE_HOME</code>
and <code>JAVA_HOME</code> are both empty, JMeter will try to guess <code>JAVA_HOME</code>.
If <code>JRE_HOME</code> and <code>JAVA_HOME</code> are both set,
<code>JAVA_HOME</code> is used.</dd>
-<dt><code>JMETER_GC_ALGO</code></dt><dd>Java runtime options
to specify JVM garbage collection algorithm. Defaults to <code>-XX:+UseG1GC -XX:MaxGCPauseMillis=250
-XX:G1ReservePercent=20</code></dd>
+<dt><code>GC_ALGO</code></dt><dd>Java runtime options to specify
JVM garbage collection algorithm. Defaults to <code>-XX:+UseG1GC -XX:MaxGCPauseMillis=250
-XX:G1ReservePercent=20</code></dd>
 <dt><code>HEAP</code></dt><dd>Java runtime options for memory
management used when JMeter is started. Defaults to <code>-Xms512m -Xmx512m -X:MaxMetaspaceSize=256m</code></dd>
+<dt><code>JAVA_HOME</code></dt><dd>Must point at your Java
Development Kit installation. Required to run the with the "<code>debug</code>"
argument. On some OSes it JMeter will try its best to guess the location of the JVM.</dd>
+<dt><code>JMETER_COMPLETE_ARGS</code></dt><dd>If set indicates,
that <code>JVM_ARGS</code> and <code>JMETER_OPTS</code> are to be
used, only. All other options like <code>HEAP</code> and <code>GC_ALGO</code>
will be ignored. Default is empty.</dd>
 <dt><code>JMETER_HOME</code></dt><dd>May point to your JMeter
install dir. If empty it will be set relative to the <code>jmeter</code> script.</dd>
 <dt><code>JMETER_LANGUAGE</code></dt><dd>Java runtime options
to specify used language. Defaults to <code>-Duser.language=en -Duser.region=EN</code></dd>
 <dt><code>JMETER_OPTS</code></dt><dd>Java runtime options used
when JMeter is started. Special options for operating systems might be added by JMeter.</dd>
+<dt><code>JRE_HOME</code></dt><dd>Must point at your Java Runtime
installation. Defaults to <code>JAVA_HOME</code> if empty. If <code>JRE_HOME</code>
and <code>JAVA_HOME</code> are both empty, JMeter will try to guess <code>JAVA_HOME</code>.
If <code>JRE_HOME</code> and <code>JAVA_HOME</code> are both set,
<code>JAVA_HOME</code> is used.</dd>
+<dt><code>JVM_ARGS</code></dt><dd>Java options to be used when
starting JMeter. These will be added before <code>JMETER_OPTS</code> and after
the other JVM options. Default is empty</code></dd>
 </dl>
 
 <subsection name="&sect-num;.4.1 JMeter's Classpath" anchor="classpath">



Mime
View raw message