Jmeter how to send request forever with delay? - loops

I am using Jmeter 2.11
I have a "counter" it include 1 to 1000 userId
And i send :
Number of threads = 1
Ramp-up perioid = 1
Loop = Forever
but "Loop" is not waiting 1 requst per second, it send all at once!
I added "Constant Timer" but it is not effect true delay so:
When i set "Constant Timer = 1000" it effect "request delay time" + "Constant Timer" so its greater then 1 second!
So i just want send 1 request per 1 second with forever loop? (i dont want request legancy)
What should my Jmeter hierarchy?

I think you need to add a constant throughput to the thread.
Here is the info.
It set samples per minute so in your case if you want 1 sample per second, would be 60 samples per minute. hope this fix your problem.

Related

Adding wait time in jmeter after every n number of threads

I have a Load test with following details:
Number of threads: 100
Ramp up time: 1 second
Thread group
|---HTTP Request1
I want the following:
100 threads to run in 1 sec
15 second delay
Then 100 threads run again
15 secs delay
.
.
.
.
Any leads would be helpful.
Amend your test configuration as follows:
Loop Controller - set how many loops you want
HTTP Request
Test Action -> Action: Pause -> Duration: 15000
Synchronizing Timer -> Number of Simultaneous Users to Group by: 100

start quartz timer immediately and then every 1 minute

I want to start quartz timer in camel immediately route starts and then after every 1 minute.
I have written cron expression that will run after every minute.
cron expression = 0 0/1 * 1/1 * ? *
can anybody suggest how can i fire job immediately and then evry 1 minute?
Thanks
Just define a cron expression for every minute and add the fireNow=true parameter. See http://camel.apache.org/quartz.html.

Jmeter timer for the http request should be run automatically every 40 minute ?

I would like to run a http request in thread group for jmeter. But it should be run per 40 minute. Therefore it should be run with frequency.
Also Im using jmeter 2.12 and jdk 1.7. So how can I configure this proceed and should I use any timer or anything?
Thread group
- Get token request
It should be run automatically every 40 minute.
Please advice me,
Your expectation is correct:
Thread Group (1 thread, loop count: forever or enough loops)
Get Token Request
Constant Timer (Thread delay: 2400000)
In this case Get Token Request method will be fired every 40 minutes (40 * 60 * 1000) where 40 is minutes, 60 is seconds per minute and 1000 is milliseconds per second
Take a look at How to Use Variables in Different Thread Groups guide to learn how to use fresh token in another Thread Group if needed.

Apache Camel - aggregator to space out requests, but not queuing requests

I have route which when sent a message invokes a refresh service
I only want the service to be invoked at most every 1 minute
If the refresh service takes longer than 1 minute (e.g. 11 minutes) I don't want requests for it to queue up
The first part: every 1 minutes is easy, I just create an aggregator with a completionTimeout of 1 mins
The part about stopping requests queueing up is not so easy and I can't figure out how to construct it
e.g.
from( seda_in )
.aggregate( constant(A), blank aggregator )
.completionTimeout( 1000 )
.process( whatever )...
if the process takes 15 seconds then potentially 15 new inoke messages could be waiting for the process when it finishes. I want at most just 1 to be waiting for however long the process takes. (its hard to predict)
how can I avoid this or structure it better to achieve my objectives?
I believe you would be interested in seeing the Throttler pattern, which is documented here http://camel.apache.org/throttler.html
Hope this helps :)
EDIT - If you are wanting to eliminate excess requests, you can also investigate setting a TTL (Time to live) header within JMS and add a concurrent consumer of 1 to your route, which means any excess messages will also be discarded.

GAE Task Queues how to make the delay?

In Task Queues code is executed to connect to the server side
through URL Fetch.
My file queue.yaml.
queue:
- Name: default
rate: 10 / m
bucket_size: 1
In such settings, Tusk performed all at once, simultaneously.
Specificity is that between the requests should be delayed at least 5
sec. Task must perform on stage with a difference> 5 sec. (but
does not parallel).
What are the values set in queue.yaml?
You can't specify minimum delays between tasks in queue.yaml, currently; you should do it (partly) in your own code. For example, if you specify a bucket size of 1 (so that more than one task should never be executing at once) and make sure the tasks runs for at least 5 seconds (get a start=time.time() at the start, time.sleep(time.time()-(5+start)) at the end) this should work. If it doesn't, have each task record in the store the timestamp it finished, and when it start check if the last task ended less than 5 seconds ago, and in that case terminate immediately.
The other way could be store the task data in table. In your task-queue add a id parameter. Fetch 1st task from table and pass its id to task queue processing servlet. In servlet at the end delay for 5 second and feth next task, pass its id and.... so on.

Resources