You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by sebb <se...@gmail.com> on 2005/09/08 14:30:30 UTC

StatCalculator Thread safety [was [Extending Aggregate listener] - extending aggregate listener in 2.1 branch]

The SamplingStatCalculator.addSample() method is definitely called
from multiple threads, but I think the rest of the class is probably
only called from a single thread.

addSample() synchronises on calculator, but if another thread accesses
calculator, it will also need to synch.

The easiest would probably be to replace ArrayList by Vector in
StatCalculator, and then synch any transactions using it.

S.
On 07/09/05, Peter Lin <wo...@gmail.com> wrote:
> I supppose we could. I should have time this weekend to take a look if no
> one else gets around to it.
> 
> peter
> 
> 
> 
> On 9/7/05, sebb <se...@gmail.com> wrote:
> > 
> > Also, the StatCalculator class is documented as being not thread-safe,
> > yet access is not always synchronised. Perhaps it needs to be?
> > 
> > S.
> > On 07/09/05, sebb <sebbaz@gmail.com > wrote:
> > > Not quite sure why you changed ArrayList to Vector in
> > > SamplingStatCalculator.java.
> > >
> > > Was it to avoid some additional synchronisation, e.g. in methods such
> > > as getSample() ? 
> > >
> > > S.
> > > On 07/09/05, studdugie <st...@gmail.com> wrote:
> > > > I've posted the patch as promised but I'm unsubscribing from the list.
> If
> > > > anyone has any questions, comments, or concerns about the patches
> please 
> > > > email me directly at this email address.
> > > >
> > > > Thank you.
> > > >
> > > > Dane
> > > >
> > > > On 9/7/05, Michael Stover <mstover1@apache.org > wrote:
> > > > >
> > > > > 2.1.1 : +1
> > > > >
> > > > > On Tue, 2005-09-06 at 17:56 -0400, Peter Lin wrote:
> > > > > > I vote for 2.1.1
> > > > > >
> > > > > > 
> > > > > > peter
> > > > > >
> > > > > >
> > > > > > On 9/6/05, sebb <se...@gmail.com> wrote:
> > > > > > >
> > > > > > > I would think within a week or so, depends on what else would be
> worth 
> > > > > > > fixing, plus finding time to do the build, collect votes etc.
> > > > > > >
> > > > > > > By the way, what should it be called?
> > > > > > >
> > > > > > > 2.1.1 or 2.2 or ?
> > > > > > >
> > > > > > > It would be useful to decide that so Bugzilla can be updated in
> > > > > > > advance - should probably get the next version added at the same
> time. 
> > > > > > >
> > > > > > > S.
> > > > > > > On 06/09/05, Peter Lin <wo...@gmail.com> wrote:
> > > > > > > > I need to write some graph classes to produce the charts and
> graphs, 
> > > > > so
> > > > > > > I
> > > > > > > > thought I might as well extend the aggregate listener. When do
> we
> > > > > plan
> > > > > > > on
> > > > > > > > releasing a new version of 2.1?
> > > > > > > >
> > > > > > > > peter
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail:
> jmeter-dev-unsubscribe@jakarta.apache.org
> > > > > > > For additional commands, e-mail:
> jmeter-dev-help@jakarta.apache.org
> > > > > > >
> > > > > > >
> > > > >
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail:
> jmeter-dev-unsubscribe@jakarta.apache.org
> > > > > For additional commands, e-mail:
> jmeter-dev-help@jakarta.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > >
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> jmeter-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> jmeter-dev-help@jakarta.apache.org
> > 
> > 
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org