You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Tom Fernandes <an...@gmx.net> on 2008/03/04 18:21:49 UTC

percental usage of HTTP Requests

Hi,

I have 3 HTTP Requests which I want to run based on statistics.

REQUEST1 should run 70% of all the thread-runs, REQUEST2 20% and REQUEST3 10% 
of all the thread-runs.

I would use a Simple Controller for grouping and underneath 3 times the 
Throughput controller (where each of them holds the specific HTTP Request as 
a child). For each of the Throughput Controllers I will set "Percent 
Execution", Throughput set to 70, 30 or 10 respectively and have "Per User" 
checked.

My Problem is, that I always want exactly one of these requests executed. 
AFAICS with the described setup I might end up having no HTTP Request 
executed or more than one HTTP Request per thread.


thanks,


Tom

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


Re: percental usage of HTTP Requests

Posted by sebb <se...@gmail.com>.
On 04/03/2008, Tom Fernandes <an...@gmx.net> wrote:
> Hi,
>
>  I have 3 HTTP Requests which I want to run based on statistics.
>
>  REQUEST1 should run 70% of all the thread-runs, REQUEST2 20% and REQUEST3 10%
>  of all the thread-runs.
>
>  I would use a Simple Controller for grouping and underneath 3 times the
>  Throughput controller (where each of them holds the specific HTTP Request as
>  a child). For each of the Throughput Controllers I will set "Percent
>  Execution", Throughput set to 70, 30 or 10 respectively and have "Per User"
>  checked.
>
>  My Problem is, that I always want exactly one of these requests executed.
>  AFAICS with the described setup I might end up having no HTTP Request
>  executed or more than one HTTP Request per thread.
>

That's true.

Another way to do this is to use the Switch Controller.
Set the controller variable to 0,1, or 2 in the appropriate portions.
You can use a random number 0-9 and convert that to 0,1 or 2 depending
on the range.
This can be done with BeanShell or Jexl or Javascript functions.

See:

http://markmail.org/message/5kksnv4zzlb3c6d4

for a sample solution

>  thanks,
>
>
>  Tom
>
>  ---------------------------------------------------------------------
>  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