Felix Frank-2 wrote:
> 
>> No, I'm not trying to chopping off the last three digits, I just want to
>> get
>> the transaction time through subtracting the 2 timestamps...but i
>> couldn't
>> do any operations on time1 and time2 directly. It seems that the time1
>> and
>> time2 are int variables by default? There are some extra lines just
>> because
>> I tried to debug this problem.
> 
> The variables are untyped to BeanShell - their values are inserted
> verbatim (as numerals) into your script.
> 
> Your log shows a "number too large" error, hence my suggestion to drop
> the milliseconds.
> 
> Your computation of "long response1" should produce a valid timespan in
> milliseconds, I believe.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org
> 
> 
> 

Hi Felix,

The problem is that I can't do any computation on time2 and time1, you
suggest me to drop milliseconds through dividing them by 1000? Or do some
formatting with the time function?
I also tried like this:
int a=1;
${__log(${a},OUT)};
int b=2;
${__log(${b},OUT)};
int c=b-a;
${__log(${c},OUT)};
But the console output is:
Log: Thread Group 1-1 : ${a}
Log: Thread Group 1-1 : ${b}
Log: Thread Group 1-1 : ${c}

Is there anything wrong with my script?

Thanks,
Yuan
-- 
View this message in context: 
http://jmeter.512774.n5.nabble.com/How-to-get-transaction-time-into-a-user-defined-variable-tp3328587p3329998.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org

Reply via email to