You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Jeremy Dahlgren <jd...@textwise.com> on 2005/08/08 00:24:06 UTC

Switch Controller Problem

Below is a posting where I asked about the Constant Throughput Timer.  The posting describes my test plan and use of a Switch Controller.  I am seeing weird behavior where the switch is executing the wrong sampler at times.  My first impression is that there is an issue with the user parameters getting updated while another thread is in the switch controller.  In the test I had 16 threads executing within a thread group where the switch controller is located.  I was curious as to whether anyone else has had problems using the switch controller.  It is much faster than the if statement controllers i was using before to determine the right sampler to run and would like to stay with the switch.  Any ideas?

Thanks,

Jeremy

>  -----Original Message-----
> From: 	Jeremy Dahlgren  
> Sent:	Sunday, August 07, 2005 5:22 PM
> To:	'jmeter-user@jakarta.apache.org'
> Subject:	Constant Throughput Timer Troubles
> 
> I have a test that needs to spread 1285200 requests across 
> 3.5 hours.  The same test also needs to spread 25200 requests 
> of a different category across the same 3.5 hours.  My test 
> plan has two thread groups.  In each thread group there is a 
> user parameters that reads requests from a file.  The file 
> has an integer that determines the request type and then the 
> request parameters.  After the user parameters there are 
> constant throughput timers and a switch controller holding 
> the samplers.  The constant throughput timers use properties 
> passed in from the command line.  The first gets 1285200 / 
> 210 = 6120 samples per minute and the second gets 25200 / 210 
> = 120 samples per minute.  The problem is that the test 
> completes in 2 hours and 20 minutes.  I was under the 
> impression that the constant throughput timer throttles the 
> samples executed "within the container where you put the 
> timer" which in my test is the thread group.   Is there a 
> problem with the construction of my test plan?  I'm not sure 
> why the requests aren't being spread evenly across the 3.5 
> hours.  Any help would be greatly appreciated.
> 
> Thanks,
> 
> Jeremy
> 
> 
> thread group 0
> -- user parameters
> -- constant throughput timer
> -- switch controller
>   -- sampler 0
>   -- sampler 1
>   -- sampler 2
> 
> thread group 1
> -- user parameters
> -- constant throughput timer
> -- switch controller
>   -- sampler 0
>   -- sampler 1
>   -- sampler 2
>   -- sampler 3
>   -- sampler 4
>   -- sampler 5

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


Re: Switch Controller Problem

Posted by sebb <se...@gmail.com>.
This could perhaps be a problem with the retrieval of the switch
value, rather than the controller per se.

Might be worth wrapping the value in a log() function call to check it.

Otherwise, it might be a bug, in which case please create a Bugzilla
issue with a short test case (the Java Sampler is useful here).

S.
On 07/08/05, Jeremy Dahlgren <jd...@textwise.com> wrote:
> Below is a posting where I asked about the Constant Throughput Timer.  The posting describes my test plan and use of a Switch Controller.  I am seeing weird behavior where the switch is executing the wrong sampler at times.  My first impression is that there is an issue with the user parameters getting updated while another thread is in the switch controller.  In the test I had 16 threads executing within a thread group where the switch controller is located.  I was curious as to whether anyone else has had problems using the switch controller.  It is much faster than the if statement controllers i was using before to determine the right sampler to run and would like to stay with the switch.  Any ideas?
> 
> Thanks,
> 
> Jeremy
> 
> >  -----Original Message-----
> > From:         Jeremy Dahlgren
> > Sent: Sunday, August 07, 2005 5:22 PM
> > To:   'jmeter-user@jakarta.apache.org'
> > Subject:      Constant Throughput Timer Troubles
> >
> > I have a test that needs to spread 1285200 requests across
> > 3.5 hours.  The same test also needs to spread 25200 requests
> > of a different category across the same 3.5 hours.  My test
> > plan has two thread groups.  In each thread group there is a
> > user parameters that reads requests from a file.  The file
> > has an integer that determines the request type and then the
> > request parameters.  After the user parameters there are
> > constant throughput timers and a switch controller holding
> > the samplers.  The constant throughput timers use properties
> > passed in from the command line.  The first gets 1285200 /
> > 210 = 6120 samples per minute and the second gets 25200 / 210
> > = 120 samples per minute.  The problem is that the test
> > completes in 2 hours and 20 minutes.  I was under the
> > impression that the constant throughput timer throttles the
> > samples executed "within the container where you put the
> > timer" which in my test is the thread group.   Is there a
> > problem with the construction of my test plan?  I'm not sure
> > why the requests aren't being spread evenly across the 3.5
> > hours.  Any help would be greatly appreciated.
> >
> > Thanks,
> >
> > Jeremy
> >
> >
> > thread group 0
> > -- user parameters
> > -- constant throughput timer
> > -- switch controller
> >   -- sampler 0
> >   -- sampler 1
> >   -- sampler 2
> >
> > thread group 1
> > -- user parameters
> > -- constant throughput timer
> > -- switch controller
> >   -- sampler 0
> >   -- sampler 1
> >   -- sampler 2
> >   -- sampler 3
> >   -- sampler 4
> >   -- sampler 5
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 
>

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