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 bu...@apache.org on 2009/11/25 22:40:33 UTC
DO NOT REPLY [Bug 48286] New: ConstantTimer's delay cannot be
changed dynamically during a test
https://issues.apache.org/bugzilla/show_bug.cgi?id=48286
Summary: ConstantTimer's delay cannot be changed dynamically
during a test
Product: JMeter
Version: 2.3.4
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: major
Priority: P2
Component: Main
AssignedTo: jmeter-dev@jakarta.apache.org
ReportedBy: vass.sanyi@freemail.hu
When I'm using Constant Timer in my testplan it turned out that the timer's
value (the speed of the stability test) could not be changed on the fly.
I was wondering why it happened, so I simply recreated the ConstantTimerGui and
ConstantTimer class itself (on a different name) and logged method calls on
them.
interesting issue 1)
It turned out, that MyTimerGui was instantiated and init'ed at the startup time
of JMeter (when there were no visible TimerGUI in JMeter at all).
Later on, I created a simple test plan, with an empty java sampler and with my
timer.
A new MyTimerGui instance was created and init'ed. A Timer object is created
here through the createTestElement() on the Gui.
interesting issue 2)
Several methods on MyConstantTimerGui was called 5 times, just because it was
created: modifyTestElment(), clearGui(), configure() and those methods, that
were called by these (getDelay, setDelay, configureTestElement...
interesting issue 3)
When I started my plan two brand new MyTimer instance were created. The first
one was just left to the garbage collection, it is never referenced again, as
far as I see. On the second one the iterationStart() and the delay() methods
were called, on each round, which is OK, except I thought those methods should
have been called on the firstly created Timer object (created by the Gui's
createTestElement() method).
interesting issue 4) (sounds like a bug to me)
when I change the delay of the timer, the Gui changes the delay's value on the
first created Timer object, not on which the framework is continuosuly calling
the delay() and the iterationStart() methods.
Summarizing it seems at the first sight, that the problem is, that two extra
Timers were created on starting a test instead of using the one, which was
created by the Gui component itself.
But. The 3rd (used) Timer object is able to retrieve the delay's value set
before starting the test, so my assumption would be that there is a problem
with the property container inside the Timers... I don't know.
Don't you think it would be very useful to be able to finetune a stability test
during the test execution itself? For example to measure the maximum throughput
of the system?
Currently there is only one way I can see as solution: during cloning the
Timers, the property map should not be cloned but the map's reference should be
copied. But it needs some hack, since the map is a private field of the
AbstractTestElement...
br,
Sandor
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
DO NOT REPLY [Bug 48286] ConstantTimer's delay cannot be changed
dynamically during a test
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48286
Sandor <va...@freemail.hu> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW
--- Comment #2 from Sandor <va...@freemail.hu> 2009-11-25 14:43:44 UTC ---
Well, dereferencing the delay value with a variable is a good workaround for
the case, although not an elegant solution of the problem, IMHO.
I can't see the point why were the timers designed that way, that their delay
values are not changeable directly on the gui, during a test on-the-fly. That's
why I assumed it was a bug.
The three Timer instance generation and the unnecessary method calls are just
an other issue. Currently they don't cause any problem, but I doubt they should
be created and called 5 times.
Anyway, regarding of the static delay value, the throughput timer behaves the
same way as the normal constant timer, its delay value is not changeable from
the GUI during a running test.
On the other hand you are right: in most cases the throughput timer is way much
useful timer than the constant timer.
As far as I see, the solution would be only that the clone() method of the
timer(s) does not clone the stored properties, but simply copies the reference
of the properties' map. But I accept if this modification is not acceptable,
since it might involve many other issues...
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
DO NOT REPLY [Bug 48286] ConstantTimer's delay cannot be changed
dynamically during a test
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48286
Sebb <se...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #1 from Sebb <se...@apache.org> 2009-11-25 13:52:45 UTC ---
A work-round is to use the Constant Throughput timer instead.
IMO this is more suited to the job anyway.
See for example:
http://jakarta.apache.org/jmeter/usermanual/best-practices.html#beanshell_server
Is that sufficient for you?
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
DO NOT REPLY [Bug 48286] ConstantTimer's delay cannot be changed
dynamically during a test
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48286
--- Comment #4 from Sandor <va...@freemail.hu> 2009-11-25 23:54:36 UTC ---
I'm sorry to hear that... :)
Thank you for your time!
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
DO NOT REPLY [Bug 48286] ConstantTimer's delay cannot be changed
dynamically during a test
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48286
Sebb <se...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
--- Comment #3 from Sebb <se...@apache.org> 2009-11-25 15:21:51 UTC ---
I misunderstood your issue; I thought the timer was not picking up changes to
its variable.
When the test run starts, the underlying plan as displayed in the GUI has to be
processed into samplers etc that are copied for each thread. This allows the
threads to operate independently.
It's just not possible to reflect subsequent GUI changes in the running code.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org