Hi all, thanks for quick reply,
I solved the problem using
1) Critical Section Controller
2) Synchronized in BeanShell

Thanks and Regards
Hemant
9013982184

On Thu, Mar 26, 2015 at 2:33 AM, Mark Wilkinson <[email protected]> wrote:

> Or you could implement some kind of mutex (locking) mechanism but that's
> probably overkill for what you need.
>
> On 25 March 2015 at 20:54, Deepak Shetty <[email protected]> wrote:
>
> > >but the value of APDEX_LOWER in property is less than 500, (470 to 490);
> > You are using a multi-threaded system and using a shared variable (so if
> > two threads execute at exactly the same time they will read the same
> value
> > increment it and set it back ) - so the behavior above is expected.
> >
> > If you just need unique values then use thread numbers to determine
> buckets
> > (i.e thread 1 is 1-100 , thread 2  =101-200 etc). if you need the
> samplers
> > to really execute these variables incrementally then there you could use
> > JMeter Counter (element or function with a global counter) or Java +
> > synchronized - but there is no guarantee that the Sampler that executed
> the
> > block first will also make the HTTP request first
> >
> > On Wed, Mar 25, 2015 at 10:10 AM, Pratapi Hemant Patel <
> > [email protected]> wrote:
> >
> > > Hi,
> > >
> > > *Test plan, 5 thread, loop count 100*
> > >
> > > I m using a http request sampler, and a BeanShell PostProcessor as a
> > child
> > > of this request,
> > >
> > > Code of BeanShell PostProcessor is
> > >
> > > float apdex_lower = Float.parseFloat(props.get("APDEX_LOWER"));
> > > apdex_lower += 1;
> > > props.put("APDEX_LOWER", Float.toString(apdex_lower));
> > >
> > >
> > > So http request sampler is executing 500 times (also verified by
> summary
> > > reprt listener)
> > >
> > > but the value of APDEX_LOWER in property is less than 500, (470 to
> 490);
> > >
> > >
> > > Thanks and Regards
> > > Hemant
> > > 9013982184
> > >
> >
>
>
>
> --
> Mark Wilkinson
> [email protected] 07968 398828
>

Reply via email to