2003-07-15 21:56:20 +08:00
|
|
|
@echo off
|
2019-12-28 21:03:53 +08:00
|
|
|
rem
|
|
|
|
|
rem Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
|
rem contributor license agreements. See the NOTICE file distributed with
|
|
|
|
|
rem this work for additional information regarding copyright ownership.
|
|
|
|
|
rem The ASF licenses this file to you under the Apache License, Version 2.0
|
|
|
|
|
rem (the "License"); you may not use this file except in compliance with
|
|
|
|
|
rem the License. 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
|
2004-02-16 21:34:10 +08:00
|
|
|
|
2006-03-29 06:47:00 +08:00
|
|
|
rem ===============================================================
|
|
|
|
|
rem Enviroment variables
|
|
|
|
|
rem SERVER_PORT (optional) - define the rmiregistry and server port
|
|
|
|
|
rem
|
|
|
|
|
rem JVM_ARGS - Java flags - these are handled by jmeter.bat
|
|
|
|
|
rem
|
|
|
|
|
rem ===============================================================
|
|
|
|
|
|
|
|
|
|
|
2014-04-25 05:18:15 +08:00
|
|
|
REM Protect environment against changes
|
|
|
|
|
setlocal
|
2003-07-15 21:56:20 +08:00
|
|
|
|
2005-03-18 23:27:20 +08:00
|
|
|
if exist jmeter-server.bat goto winNT1
|
|
|
|
|
echo Changing to JMeter home directory
|
|
|
|
|
cd /D %~dp0
|
|
|
|
|
:winNT1
|
|
|
|
|
|
2003-07-15 21:56:20 +08:00
|
|
|
if exist %JMETER_HOME%\lib\ext\ApacheJMeter_core.jar goto setCP
|
|
|
|
|
echo Could not find ApacheJmeter_core.jar ...
|
|
|
|
|
REM Try to work out JMETER_HOME
|
|
|
|
|
echo ... Trying JMETER_HOME=..
|
|
|
|
|
set JMETER_HOME=..
|
|
|
|
|
if exist %JMETER_HOME%\lib\ext\ApacheJMeter_core.jar goto setCP
|
|
|
|
|
echo ... trying JMETER_HOME=.
|
|
|
|
|
set JMETER_HOME=.
|
|
|
|
|
if exist %JMETER_HOME%\lib\ext\ApacheJMeter_core.jar goto setCP
|
|
|
|
|
echo Cannot determine JMETER_HOME !
|
|
|
|
|
goto exit
|
|
|
|
|
|
|
|
|
|
:setCP
|
|
|
|
|
echo Found ApacheJMeter_core.jar
|
2006-03-29 06:47:00 +08:00
|
|
|
|
2007-10-16 22:39:22 +08:00
|
|
|
REM No longer need to create the rmiregistry as it is done by the server
|
2017-05-01 04:36:15 +08:00
|
|
|
REM set CLASSPATH=%JMETER_HOME%\lib\ext\ApacheJMeter_core.jar;%JMETER_HOME%\lib\jorphan.jar
|
2007-10-16 22:39:22 +08:00
|
|
|
|
|
|
|
|
REM START rmiregistry %SERVER_PORT%
|
|
|
|
|
REM
|
2003-06-10 00:07:59 +08:00
|
|
|
|
|
|
|
|
rem On NT/2K grab all arguments at once
|
|
|
|
|
set JMETER_CMD_LINE_ARGS=%*
|
|
|
|
|
|
2006-03-29 06:47:00 +08:00
|
|
|
if not "%SERVER_PORT%" == "" goto port
|
|
|
|
|
|
2007-03-18 03:39:55 +08:00
|
|
|
call jmeter -s -j jmeter-server.log %JMETER_CMD_LINE_ARGS%
|
2006-03-29 06:47:00 +08:00
|
|
|
goto end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
:port
|
2007-03-18 03:39:55 +08:00
|
|
|
call jmeter -Dserver_port=%SERVER_PORT% -s -j jmeter-server.log %JMETER_CMD_LINE_ARGS%
|
2006-03-29 06:47:00 +08:00
|
|
|
|
|
|
|
|
:end
|
2003-07-15 21:56:20 +08:00
|
|
|
|
2007-12-11 22:37:03 +08:00
|
|
|
rem No longer needed, as server is started in-process
|
|
|
|
|
rem taskkill /F /IM rmiregistry.exe
|
2006-04-06 02:41:06 +08:00
|
|
|
|
2019-12-28 21:03:53 +08:00
|
|
|
:exit
|