By default grinder 3.4 comes with a jython jar under lib directory. It is version 2.2.1.
In order two use a newer jython, you need to change two settings:
- add your newest jython jar in front of classpath
- add a jvm property that directs python_home to the home of your jython.
@echo off set GRINDERPATH=C:\development\grinder-3.4 call %GRINDERPATH%\setGrinderEnv.cmd set PYTHON_HOME=C:/development/jython2.5.1 echo %CLASSPATH% set CLASSPATH=%PYTHON_HOME%/jython.jar;%CLASSPATH% set JVMARGS="-Dpython.home=%PYTHON_HOME% -Dpython.cachedir=%GRINDERPATH%/cachedir" java -Duser.language="en" -Dgrinder.jvm.arguments=%JVMARGS% -cp %CLASSPATH% net.grinder.Grinder %GRINDERPROPERTIES%When I run a script with this agent cmd, my output looks like:
04.06.10 13:53:46 (process emeafralp560-0): The Grinder version 3.4 04.06.10 13:53:46 (process emeafralp560-0): Java(TM) SE Runtime Environment 1.6.0_20-b02: Java HotSpot(TM) Client VM (16.3-b01, mixed mode) on Windows XP x86 5.1 04.06.10 13:53:46 (process emeafralp560-0): time zone is MESZ (+0200) 04.06.10 13:53:48 (process emeafralp560-0): worker process 0 04.06.10 13:53:48 (process emeafralp560-0): instrumentation agents: byte code transforming instrumenter for Jython 2.5; byte code transforming instrumenter for Java 04.06.10 13:53:48 (process emeafralp560-0): executing "C:\development\grinder-3.4\HelloGrinder3.py" using Jython 2.5.1 (Release_2_5_1:6813, Sep 26 2009, 13:47:54) [Java HotSpot(TM) Client VM (Sun Microsystems Inc.)]I think that by default it is already using the new instrumentation implementation that gets used by jython 2.5.1. Manual states namely that if you use the old one, the output shows you
traditional Jython instrumenterI did not see it, and could not influence the output with parameter
grinder.dcrinstrumentation = trueSo I compared behaviour with a grinder using jython 2.2.1. There using this parameter did make an influence. If you included the parameter, regardless the value you are giving it (true|anything|even-false|false), it will use the new way of instrumentation. Only when you leave the parameter out, you will get output:
04.06.10 14:00:34 (process emeafralp560-0): The Grinder version 3.4 04.06.10 14:00:34 (process emeafralp560-0): Java(TM) SE Runtime Environment 1.6.0_20-b02: Java HotSpot(TM) Client VM (16.3-b01, mixed mode) on Windows XP x86 5.1 04.06.10 14:00:34 (process emeafralp560-0): time zone is MESZ (+0200) 04.06.10 14:00:34 (process emeafralp560-0): worker process 0 04.06.10 14:00:34 (process emeafralp560-0): instrumentation agents: traditional Jython instrumenter; byte code transforming instrumenter for Java 04.06.10 14:00:34 (process emeafralp560-0): executing "C:\development\grinder-3.4\HelloGrinder3.py" using Jython 2.2.1
Comments