You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by Philippe Mouawad <ph...@gmail.com> on 2011/11/30 21:57:40 UTC
Question about StandardJMeterEngine#engine
Hello,
Do you see any reason for engine field being static ?
- All static methods that use it are not called anywhere
- askThreadsToStop could just call stopTest(false)
I think field should be removed to make code cleaner.
Regards.
Philippe.
Re: Question about StandardJMeterEngine#engine
Posted by sebb <se...@gmail.com>.
On 30 November 2011 21:57, Philippe Mouawad <ph...@gmail.com> wrote:
> Thanks for answers, see below
>
> On Wed, Nov 30, 2011 at 10:53 PM, sebb <se...@gmail.com> wrote:
>
>> On 30 November 2011 20:57, Philippe Mouawad <ph...@gmail.com>
>> wrote:
>> > Hello,
>> > Do you see any reason for engine field being static ?
>>
>> As per the comments:
>>
>> // Allow engine and threads to be stopped from outside a thread
>> // e.g. from beanshell server
>> // Assumes that there is only one instance of the engine
>> // at any one time so it is not guaranteed to work ...
>>
>> > - All static methods that use it are not called anywhere
>>
>> BeanShell scripts use introspection to get access.
>>
> Where can I find current users of this ? (to see if I can change it )
Impossible to find all existing uses.
Anyone can write a script that uses any public method.
Any change in binary compatibility can potentially cause a script to fail.
However, check the documentation and sample scripts.
That will give an idea as to what users might reasonably expect to be
able to use.
>> > - askThreadsToStop could just call stopTest(false)
>>
>> Yes, I think it could.
>>
>> >
>> > I think field should be removed to make code cleaner.
>>
>> Only if an alternative way can be found to allow scripts to access the
>> engine.
>> But would probably still need to keep the static methods, at least for a
>> while.
>>
>> > Regards.
>> > Philippe.
>>
>
>
>
> --
> Cordialement.
> Philippe Mouawad.
Re: Question about StandardJMeterEngine#engine
Posted by Philippe Mouawad <ph...@gmail.com>.
Thanks for answers, see below
On Wed, Nov 30, 2011 at 10:53 PM, sebb <se...@gmail.com> wrote:
> On 30 November 2011 20:57, Philippe Mouawad <ph...@gmail.com>
> wrote:
> > Hello,
> > Do you see any reason for engine field being static ?
>
> As per the comments:
>
> // Allow engine and threads to be stopped from outside a thread
> // e.g. from beanshell server
> // Assumes that there is only one instance of the engine
> // at any one time so it is not guaranteed to work ...
>
> > - All static methods that use it are not called anywhere
>
> BeanShell scripts use introspection to get access.
>
> Where can I find current users of this ? (to see if I can change it )
> > - askThreadsToStop could just call stopTest(false)
>
> Yes, I think it could.
>
> >
> > I think field should be removed to make code cleaner.
>
> Only if an alternative way can be found to allow scripts to access the
> engine.
> But would probably still need to keep the static methods, at least for a
> while.
>
> > Regards.
> > Philippe.
>
--
Cordialement.
Philippe Mouawad.
Re: Question about StandardJMeterEngine#engine
Posted by sebb <se...@gmail.com>.
On 30 November 2011 20:57, Philippe Mouawad <ph...@gmail.com> wrote:
> Hello,
> Do you see any reason for engine field being static ?
As per the comments:
// Allow engine and threads to be stopped from outside a thread
// e.g. from beanshell server
// Assumes that there is only one instance of the engine
// at any one time so it is not guaranteed to work ...
> - All static methods that use it are not called anywhere
BeanShell scripts use introspection to get access.
> - askThreadsToStop could just call stopTest(false)
Yes, I think it could.
>
> I think field should be removed to make code cleaner.
Only if an alternative way can be found to allow scripts to access the engine.
But would probably still need to keep the static methods, at least for a while.
> Regards.
> Philippe.