Re: DO NOT REPLY [Bug 52019] Add menu option to enable/disable timers when running Plan

2011-10-13 Thread Philippe Mouawad
Thanks for your advice, it is much better implementation
I implemented it this way.

On Thu, Oct 13, 2011 at 8:23 PM, sebb  wrote:

> On 13 October 2011 18:34, Philippe Mouawad
>  wrote:
> > Hello Sebb,
> > Do you agree with this proposition :
> >
> >   - Add an Menu Option called "Run with timers disabled"
>
> I see - so it would only apply to GUI runs - that's reasonable.
>
> >   - This option will set a boolean on GuiPackage#getinstance() called
> >   noTimersPause
> >   - Timers will consult this option to decide whether to run or not pause
>
> That would require changing all timers; what happens about 3rd party
> timers?
> See below for simpler option.
>
> >   - At end of run option will be reset (what would be the best way to
> >   detect end, StandardJMeterEngine#run after waitThreadsStopped ?)
> >
>
> The GUI Start code has to clone and traverse the tree before passing
> it to the engine, so it could remove the Timers there.
> Disabled elements are removed anyway, so it could alternatively
> disable them if that was easier.
>
> Perhaps create a subclass of TreeCloner that skips Timers.
>
> No need to reset the option afterwards.
>
> > If you are Ok, I can implement it.
> >
> > Regards
> > Philippe
> >
> > On Thu, Oct 13, 2011 at 1:09 PM, Philippe Mouawad <
> > p.moua...@ubik-ingenierie.com> wrote:
> >
> >> Hello Sebb,
> >> In my opinion this option would be useful only in Scripting Phase so
> >> through GUI.
> >> That's why I wanted it as a Menu Option or maybe "Run with timers
> disabled"
> >> .
> >>
> >> My implementation idea was to test in parent delay() method a check for
> >> this option and return immediately if it is on.
> >>
> >> This would make it simple to implement and would not be persisted in
> Test
> >> Plan nor disabling of Timers would occur.
> >> What do you think ?
> >>
> >> Regards
> >> Philippe
> >>
> >>
> >> On Thu, Oct 13, 2011 at 12:59 PM,  wrote:
> >>
> >>> https://issues.apache.org/bugzilla/show_bug.cgi?id=52019
> >>>
> >>> --- Comment #1 from Sebb  2011-10-13 10:59:33 UTC ---
> >>> Rather than a Menu item, perhaps it should be a Test Plan option, which
> >>> would
> >>> mean checking for it in the engine code. But I think it would be
> simpler
> >>> overall.
> >>>
> >>> If done via a Menu option, disabling is easy.
> >>>
> >>> However, I assume there would be a re-enable option - what about timers
> >>> that
> >>> were originally disabled? Seems wrong to enable those, so the code
> would
> >>> have
> >>> to keep track of which Timers did not need re-enabling.
> >>>
> >>> What if the Test Plan were updated in the mean-time? How could one keep
> >>> track
> >>> of which Timers to re-enable?
> >>>
> >>> Using a Test Plan option would mean it would also work in non-GUI and
> >>> client-server mode.
> >>>
> >>> --
> >>> Configure bugmail:
> >>> https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
> >>> --- You are receiving this mail because: ---
> >>> You reported the bug.
> >>>
> >>
> >>
> >>
> >> --
> >> Cordialement.
> >> Philippe Mouawad.
> >> Ubik-Ingénierie
> >>
> >>
> >>
> >>
> >
> >
> > --
> > Cordialement.
> > Philippe Mouawad.
> > Ubik-Ingénierie
> >
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@jakarta.apache.org
> For additional commands, e-mail: dev-h...@jakarta.apache.org
>
>


-- 
Cordialement.
Philippe Mouawad.


Re: DO NOT REPLY [Bug 52019] Add menu option to enable/disable timers when running Plan

2011-10-13 Thread sebb
On 13 October 2011 18:34, Philippe Mouawad
 wrote:
> Hello Sebb,
> Do you agree with this proposition :
>
>   - Add an Menu Option called "Run with timers disabled"

I see - so it would only apply to GUI runs - that's reasonable.

>   - This option will set a boolean on GuiPackage#getinstance() called
>   noTimersPause
>   - Timers will consult this option to decide whether to run or not pause

That would require changing all timers; what happens about 3rd party timers?
See below for simpler option.

>   - At end of run option will be reset (what would be the best way to
>   detect end, StandardJMeterEngine#run after waitThreadsStopped ?)
>

The GUI Start code has to clone and traverse the tree before passing
it to the engine, so it could remove the Timers there.
Disabled elements are removed anyway, so it could alternatively
disable them if that was easier.

Perhaps create a subclass of TreeCloner that skips Timers.

No need to reset the option afterwards.

> If you are Ok, I can implement it.
>
> Regards
> Philippe
>
> On Thu, Oct 13, 2011 at 1:09 PM, Philippe Mouawad <
> p.moua...@ubik-ingenierie.com> wrote:
>
>> Hello Sebb,
>> In my opinion this option would be useful only in Scripting Phase so
>> through GUI.
>> That's why I wanted it as a Menu Option or maybe "Run with timers disabled"
>> .
>>
>> My implementation idea was to test in parent delay() method a check for
>> this option and return immediately if it is on.
>>
>> This would make it simple to implement and would not be persisted in Test
>> Plan nor disabling of Timers would occur.
>> What do you think ?
>>
>> Regards
>> Philippe
>>
>>
>> On Thu, Oct 13, 2011 at 12:59 PM,  wrote:
>>
>>> https://issues.apache.org/bugzilla/show_bug.cgi?id=52019
>>>
>>> --- Comment #1 from Sebb  2011-10-13 10:59:33 UTC ---
>>> Rather than a Menu item, perhaps it should be a Test Plan option, which
>>> would
>>> mean checking for it in the engine code. But I think it would be simpler
>>> overall.
>>>
>>> If done via a Menu option, disabling is easy.
>>>
>>> However, I assume there would be a re-enable option - what about timers
>>> that
>>> were originally disabled? Seems wrong to enable those, so the code would
>>> have
>>> to keep track of which Timers did not need re-enabling.
>>>
>>> What if the Test Plan were updated in the mean-time? How could one keep
>>> track
>>> of which Timers to re-enable?
>>>
>>> Using a Test Plan option would mean it would also work in non-GUI and
>>> client-server mode.
>>>
>>> --
>>> Configure bugmail:
>>> https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
>>> --- You are receiving this mail because: ---
>>> You reported the bug.
>>>
>>
>>
>>
>> --
>> Cordialement.
>> Philippe Mouawad.
>> Ubik-Ingénierie
>>
>>
>>
>>
>
>
> --
> Cordialement.
> Philippe Mouawad.
> Ubik-Ingénierie
>

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



Re: DO NOT REPLY [Bug 52019] Add menu option to enable/disable timers when running Plan

2011-10-13 Thread Philippe Mouawad
Hello Sebb,
Do you agree with this proposition :

   - Add an Menu Option called "Run with timers disabled"
   - This option will set a boolean on GuiPackage#getinstance() called
   noTimersPause
   - Timers will consult this option to decide whether to run or not pause
   - At end of run option will be reset (what would be the best way to
   detect end, StandardJMeterEngine#run after waitThreadsStopped ?)


If you are Ok, I can implement it.

Regards
Philippe

On Thu, Oct 13, 2011 at 1:09 PM, Philippe Mouawad <
p.moua...@ubik-ingenierie.com> wrote:

> Hello Sebb,
> In my opinion this option would be useful only in Scripting Phase so
> through GUI.
> That's why I wanted it as a Menu Option or maybe "Run with timers disabled"
> .
>
> My implementation idea was to test in parent delay() method a check for
> this option and return immediately if it is on.
>
> This would make it simple to implement and would not be persisted in Test
> Plan nor disabling of Timers would occur.
> What do you think ?
>
> Regards
> Philippe
>
>
> On Thu, Oct 13, 2011 at 12:59 PM,  wrote:
>
>> https://issues.apache.org/bugzilla/show_bug.cgi?id=52019
>>
>> --- Comment #1 from Sebb  2011-10-13 10:59:33 UTC ---
>> Rather than a Menu item, perhaps it should be a Test Plan option, which
>> would
>> mean checking for it in the engine code. But I think it would be simpler
>> overall.
>>
>> If done via a Menu option, disabling is easy.
>>
>> However, I assume there would be a re-enable option - what about timers
>> that
>> were originally disabled? Seems wrong to enable those, so the code would
>> have
>> to keep track of which Timers did not need re-enabling.
>>
>> What if the Test Plan were updated in the mean-time? How could one keep
>> track
>> of which Timers to re-enable?
>>
>> Using a Test Plan option would mean it would also work in non-GUI and
>> client-server mode.
>>
>> --
>> Configure bugmail:
>> https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
>> --- You are receiving this mail because: ---
>> You reported the bug.
>>
>
>
>
> --
> Cordialement.
> Philippe Mouawad.
> Ubik-Ingénierie
>
>
>
>


-- 
Cordialement.
Philippe Mouawad.
Ubik-Ingénierie