Re: User defined mean test times

Philip Aston <[email protected]>
Newsgroups gmane.comp.java.grinder.user
Message-ID <[email protected]>
The userLong statistics are not sample statistics, so I'm afraid the sum
and count operators cannot be used.

As a workaround, you could keep the sum in userLong0 and count in
userLong1, then say "(/ userLong0 userLong1)".

- Phil

On 03/12/13 09:27, [email protected] wrote:
> Here it is:
>
> 2013-12-03 14:53:40,527 INFO  agent: worker HYDCNU304BWC0-0 started
> 2013-12-03 14:53:47,348 ERROR HYDCNU304BWC0-0: aborting process - Java
> exception initialising test script
> net.grinder.scriptengine.jython.JythonScriptExecutionException: Java
> exception initialising test script
>         grinder.statistics.registerSummaryExpression("Mean 200 response",
> "(/ (sum userLong0) (count userLong0) )")
>         File
> "C:\Users\reddys.ADS\.\HYDCNU304BWC0-file-store\current\a360utility.py",
> line 82, in <module>
>         from a360utility import A360Utility
>         File
> "C:\Users\reddys.ADS\.\HYDCNU304BWC0-file-store\current\Main.py", line 8, in
> <module>
> net.grinder.statistics.StatisticExpressionFactoryImplementation$ParseContext$ParseException:
> Parse exception: Can't apply sum to unknown sample index
> 'userLong0', at character 17 of '(/ (sum userLong0) (count userLong0) )'
>         at
> net.grinder.statistics.StatisticExpressionFactoryImplementation$ParseContext.createParseException(StatisticExpressionFactoryImplementation.
> java:830) ~[grinder-core-3.11.jar:na]
>         at
> net.grinder.statistics.StatisticExpressionFactoryImplementation$ParseContext.createParseException(StatisticExpressionFactoryImplementation.
> java:826) ~[grinder-core-3.11.jar:na]
>         at
> net.grinder.statistics.StatisticExpressionFactoryImplementation$ParseContext.access$000(StatisticExpressionFactoryImplementation.java:754)
> ~[grinder-core-3.11.jar:na]
>         at
> net.grinder.statistics.StatisticExpressionFactoryImplementation.createSampleSum(StatisticExpressionFactoryImplementation.java:401)
> ~[grinder-core-3.11.jar:na]
>         at
> net.grinder.statistics.StatisticExpressionFactoryImplementation.readExpression(StatisticExpressionFactoryImplementation.java:142)
> ~[grinder-core-3.11.jar:na]
>         at
> net.grinder.statistics.StatisticExpressionFactoryImplementation.readExpression(StatisticExpressionFactoryImplementation.java:138)
> ~[grinder-core-3.11.jar:na]
>         at
> net.grinder.statistics.StatisticExpressionFactoryImplementation.createExpression(StatisticExpressionFactoryImplementation.java:101)
> ~[grinder-core-3.11.jar:na]
>         at
> net.grinder.statistics.StatisticExpressionFactoryImplementation.createExpressionView(StatisticExpressionFactoryImplementation.java:542)
> ~[grinder-core-3.11.jar:na]
>         at
> net.grinder.engine.process.ScriptStatisticsImplementation.registerSummaryExpression(ScriptStatisticsImplementation.java:88)
> ~[grinder-core-3.11.jar:na]
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> ~[na:1.7.0_40]
>         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> ~[na:1.7.0_40]
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> ~[na:1.7.0_40]
>         at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.7.0_40]
>         at
> org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:186)
> ~[jython-standalone-2.5.3.jar:na]
>         at
> org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:204)
> ~[jython-standalone-2.5.3.jar:na]
>         at org.python.core.PyObject.__call__(PyObject.java:422)
> ~[jython-standalone-2.5.3.jar:na]
>         at org.python.core.PyObject.__call__(PyObject.java:426)
> ~[jython-standalone-2.5.3.jar:na]
>         at org.python.core.PyMethod.__call__(PyMethod.java:139)
> ~[jython-standalone-2.5.3.jar:na]
>         at
> a360utility$py.f$0(C:\Users\reddys.ADS\.\HYDCNU304BWC0-file-store\current\a360utility.py:521)
> ~[na:na]
>         at
> a360utility$py.call_function(C:\Users\reddys.ADS\.\HYDCNU304BWC0-file-store\current\a360utility.py)
> ~[na:na]
>         at org.python.core.PyTableCode.call(PyTableCode.java:165)
> ~[jython-standalone-2.5.3.jar:na]
>         at org.python.core.PyCode.call(PyCode.java:18)
> ~[jython-standalone-2.5.3.jar:na]
>         at org.python.core.imp.createFromCode(imp.java:391)
> ~[jython-standalone-2.5.3.jar:na]
>         at org.python.core.imp.createFromSource(imp.java:354)
> ~[jython-standalone-2.5.3.jar:na]
>         at org.python.core.imp.loadFromSource(imp.java:581)
> ~[jython-standalone-2.5.3.jar:na]
>         at org.python.core.imp.find_module(imp.java:478)
> ~[jython-standalone-2.5.3.jar:na]
>         at org.python.core.imp.import_next(imp.java:718)
> ~[jython-standalone-2.5.3.jar:na]
>         at org.python.core.imp.import_module_level(imp.java:827)
> ~[jython-standalone-2.5.3.jar:na]
>         at org.python.core.imp.importName(imp.java:917)
> ~[jython-standalone-2.5.3.jar:na]
>         at org.python.core.ImportFunction.__call__(__builtin__.java:1220)
> ~[jython-standalone-2.5.3.jar:na]
>         at org.python.core.PyObject.__call__(PyObject.java:357)
> ~[jython-standalone-2.5.3.jar:na]
>         at org.python.core.__builtin__.__import__(__builtin__.java:1173)
> ~[jython-standalone-2.5.3.jar:na]
>         at org.python.core.imp.importFromAs(imp.java:1011)
> ~[jython-standalone-2.5.3.jar:na]
>         at org.python.core.imp.importFrom(imp.java:987)
> ~[jython-standalone-2.5.3.jar:na]
>         at
> org.python.pycode._pyx1.f$0(C:\Users\reddys.ADS\.\HYDCNU304BWC0-file-store\current\Main.py:90)
> ~[na:na]
>         at
> org.python.pycode._pyx1.call_function(C:\Users\reddys.ADS\.\HYDCNU304BWC0-file-store\current\Main.py)
> ~[na:na]
>         at org.python.core.PyTableCode.call(PyTableCode.java:165)
> ~[jython-standalone-2.5.3.jar:na]
>         at org.python.core.PyCode.call(PyCode.java:18)
> ~[jython-standalone-2.5.3.jar:na]
>         at org.python.core.Py.runCode(Py.java:1275)
> ~[jython-standalone-2.5.3.jar:na]
>         at org.python.core.__builtin__.execfile_flags(__builtin__.java:522)
> ~[jython-standalone-2.5.3.jar:na]
>         at
> org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:225)
> ~[jython-standalone-2.5.3.jar:na]
>         at
> net.grinder.scriptengine.jython.JythonScriptEngine.<init>(JythonScriptEngine.java:129)
> ~[grinder-core-3.11.jar:na]
>         at
> net.grinder.scriptengine.jython.JythonScriptEngineService.createScriptEngine(JythonScriptEngineService.java:102)
> ~[grinder-core-3.11.jar:na]
>         at
> net.grinder.engine.process.ScriptEngineContainer.getScriptEngine(ScriptEngineContainer.java:81)
> ~[grinder-core-3.11.jar:na]
>         at
> net.grinder.engine.process.GrinderProcess.run(GrinderProcess.java:404)
> ~[grinder-core-3.11.jar:na]
>         at
> net.grinder.engine.process.WorkerProcessEntryPoint.run(WorkerProcessEntryPoint.java:86)
> [grinder-core-3.11.jar:na]
>         at
> net.grinder.engine.process.WorkerProcessEntryPoint.main(WorkerProcessEntryPoint.java:59)
> [grinder-core-3.11.jar:na]
>
>


------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.