hmm , I am happy that my naive question about extending TcpSampler has triggerd
this kind of a discussion. Its good to be part of such discussion (though I
understood very few things in it) where Jmter stalwarts are discussing its
internals.
sebb your statement which says
"It seems the TCP Sampler already re-uses connections within a thread. "
essentially means that a single socket is shared across all TcpSamplers and
there is no need for me to extend it in the way i planned.
If that is the case, its fantastic (hurray Jmeter solved my problem yet again
and that too with out writing single line of code)
Hope some day I will get a chance to work on jmeter internals and contribite to
the this great open source movement
with regards
Srikanth.P
sebb <[EMAIL PROTECTED]> wrote:
Thanks again - that would be SearchByClass.
I see now that JMeterThread already uses that to find the Listeners,
so it could also use it find the new interface, and use that to call
the threadStarted and threadFinished methods. Might get a chance to
commit that later tonight.
S.
On 21/07/05, Michael Stover wrote:
> There is a tree traverser that knows how to search for all objects of a
> certain type. So, that provides a very convenient way to find all the
> ThreadListeners.
>
> -Mike
>
> On Thu, 2005-07-21 at 16:44 +0100, sebb wrote:
> > Oops, that's my fault - I implemented it over a year ago, and promptly
> > forgot about it ...
> >
> > Obviously I thought it was useful at the time, but I did not consider
> > the effect on test startup/shutdown.
> >
> > Looking at it again now, I suppose the cloneTree method could check
> > for the appropriate interface and save the appropriate objects in a
> > collection associated with the thread, and use that collection to
> > invoke the threadStarted/Finished methods.
> >
> > Simply changing the existing code to check if the interface was
> > implemented before calling the method would probably just increase the
> > work done.
> >
> > S.
> > On 21/07/05, Michael Stover wrote:
> > > Well, I was a little surprised to discover this method is a part of
> > > every TestElement. That seems like overkill, and maybe it would be more
> > > appropriate for it to be a separate interface that any element can
> > > implement. If every Test Element object instance in a test has to have
> > > it's "threadFinished()" method called, I can see that slowing down test
> > > shutdown on large tests.
> > >
> > > -Mike
> > >
> > > On Thu, 2005-07-21 at 15:44 +0100, sebb wrote:
> > > > That's a lot simpler - don't know how I managed to miss that one.
> > > >
> > > > S.
> > > > On 21/07/05, Michael Stover wrote:
> > > > > On Thu, 2005-07-21 at 15:17 +0100, sebb wrote:
> > > > > > On 21/07/05, Michael Stover wrote:
> > > > > > > JMeter has a global namespace and thread-specific namespaces.
> > > > > > > Seems to
> > > > > > > me you would want to store your socket in the thread-specific
> > > > > > > namespace,
> > > > > > > and any TCP Sampler can retrieve it from there. Each one should
> > > > > > > also be
> > > > > > > able to create a new one if it does not yet exist, and at test
> > > > > > > end, the
> > > > > > > sampler should make sure to clean it out (implement TestListener).
> > > > > >
> > > > > > If I recall correctly, the TestListener testEnded() method is called
> > > > > > from a single, different thread - and only one instance is called.
> > > > > > The
> > > > > > existing TCP sampler uses a private static Set to keep track of
> > > > > > these.
> > > > >
> > > > > That's a good point. Instead, each element can override the
> > > > > threadFinished() method of TestElement to do this sort of cleanup.
> > > > >
> > > > > -Mike
> > > > >
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > 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]
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > 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]
> >
>
>
> ---------------------------------------------------------------------
> 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]
---------------------------------
Free antispam, antivirus and 1GB to save all your messages
Only in Yahoo! Mail: http://in.mail.yahoo.com