On 6 January 2011 15:42, zhouyuan <[email protected]> wrote: > > I find the following information in the log file: > 2011/01/06 23:36:56 ERROR - jmeter.util.BeanShellInterpreter: Error invoking > bsh method: eval Sourced file: inline evaluation of: ``long > rt=prev.getTime(); print(rt); Long time1=System.currentTimeMillis() print(t > . . . '' : Typed variable declaration : Attempt to resolve method: getTime() > on undefined variable or class name: prev > 2011/01/06 23:36:56 WARN - jmeter.timers.BeanShellTimer: Problem in > BeanShell script org.apache.jorphan.util.JMeterException: Error invoking bsh > method: eval Sourced file: inline evaluation of: ``long rt=prev.getTime(); > print(rt); Long time1=System.currentTimeMillis() print(t . . . '' : Typed > variable declaration : Attempt to resolve method: getTime() on undefined > variable or class name: prev
Sorry, it looks like the BeanShellTimer does not have the 'prev' variable set up, unlike the BSH PostProcessor However, you can get it from the context: prev=ctx.getPreviousResult() > -- > View this message in context: > http://jmeter.512774.n5.nabble.com/How-to-get-transaction-time-into-a-user-defined-variable-tp3328587p3330602.html > Sent from the JMeter - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

