Discussion:
Delay Between Http Requests
Nayak, Soumya R.
2018-09-15 04:12:53 UTC
Permalink
Hi All,

Can you please let me know like what is the best way to put delay between HTTP requests.
In bean shell sampler pre processor I had used "Thread.sleep(millis) " , what I observed was if I run using one user and after coming of the response it sleeps for the specified time and then sends.

Is there anything where we can send requests exactly at the specified time without considering the response time of the previous requests.

For example : I submitted a HTTP request with one user at 1:00:00 PM and the response came at 1:00:50 PM , now my thread will sleep (let say delay of 60 seconds) and fire another http request at 1:01:50 Pm but my requirement is to fire the request at exactly 1:01:00 PM rather than considering the 50 seconds of response time.

Is there any way of achieving this?
Also please let me know if in JMeter its possible to submit requests asynchronously?

Regards,
Soumya

******************************************************************************************
This message may contain confidential or proprietary information intended only for the use of the
addressee(s) named above or may contain information that is legally privileged. If you are
not the intended addressee, or the person responsible for delivering it to the intended addressee,
you are hereby notified that reading, disseminating, distributing or copying this message is strictly
prohibited. If you have received this message by mistake, please immediately notify us by
replying to the message and delete the original message and any copies immediately thereafter.

If you received this email as a commercial message and would like to opt out of future commercial
messages, please let us know and we will remove you from our distribution list.

Thank you.~
******************************************************************************************
FAFLD
Ivan Rancati
2018-09-15 06:53:46 UTC
Permalink
Would a Constant Throughput Timer
http://jmeter.apache.org/usermanual/component_reference.html#Constant_Throughput_Timer
work for you?

Best regards
Post by Nayak, Soumya R.
Hi All,
Can you please let me know like what is the best way to put delay between HTTP requests.
In bean shell sampler pre processor I had used "Thread.sleep(millis) " ,
what I observed was if I run using one user and after coming of the
response it sleeps for the specified time and then sends.
Is there anything where we can send requests exactly at the specified time
without considering the response time of the previous requests.
For example : I submitted a HTTP request with one user at 1:00:00 PM and
the response came at 1:00:50 PM , now my thread will sleep (let say delay
of 60 seconds) and fire another http request at 1:01:50 Pm but my
requirement is to fire the request at exactly 1:01:00 PM rather than
considering the 50 seconds of response time.
Is there any way of achieving this?
Also please let me know if in JMeter its possible to submit requests asynchronously?
Regards,
Soumya
******************************************************************************************
This message may contain confidential or proprietary information intended
only for the use of the
addressee(s) named above or may contain information that is legally privileged. If you are
not the intended addressee, or the person responsible for delivering it to
the intended addressee,
you are hereby notified that reading, disseminating, distributing or
copying this message is strictly
prohibited. If you have received this message by mistake, please immediately notify us by
replying to the message and delete the original message and any copies
immediately thereafter.
If you received this email as a commercial message and would like to opt
out of future commercial
messages, please let us know and we will remove you from our distribution list.
Thank you.~
******************************************************************************************
FAFLD
Deepak Goel
2018-09-15 14:55:02 UTC
Permalink
if i may ask, why is there such a requirement? it might lead to unnecessary
queuing at the server leading to an exponential increase in response time
Post by Nayak, Soumya R.
Hi All,
Can you please let me know like what is the best way to put delay between HTTP requests.
In bean shell sampler pre processor I had used "Thread.sleep(millis) " ,
what I observed was if I run using one user and after coming of the
response it sleeps for the specified time and then sends.
Is there anything where we can send requests exactly at the specified time
without considering the response time of the previous requests.
For example : I submitted a HTTP request with one user at 1:00:00 PM and
the response came at 1:00:50 PM , now my thread will sleep (let say delay
of 60 seconds) and fire another http request at 1:01:50 Pm but my
requirement is to fire the request at exactly 1:01:00 PM rather than
considering the 50 seconds of response time.
Is there any way of achieving this?
Also please let me know if in JMeter its possible to submit requests asynchronously?
Regards,
Soumya
******************************************************************************************
This message may contain confidential or proprietary information intended
only for the use of the
addressee(s) named above or may contain information that is legally privileged. If you are
not the intended addressee, or the person responsible for delivering it to
the intended addressee,
you are hereby notified that reading, disseminating, distributing or
copying this message is strictly
prohibited. If you have received this message by mistake, please immediately notify us by
replying to the message and delete the original message and any copies
immediately thereafter.
If you received this email as a commercial message and would like to opt
out of future commercial
messages, please let us know and we will remove you from our distribution list.
Thank you.~
******************************************************************************************
FAFLD
Deepak Shetty
2018-09-17 17:00:14 UTC
Permalink
https://jmeter.apache.org/usermanual/component_reference.html#timers
You could also use the JSR223 timer to read the current time and determine
how much delay to return. You do however need to figure out what you want
to do when your previous sampler takes more than (in your example) 1 minute
since the window has already passed.
Also please let me know if in JMeter its possible to submit requests asynchronously?
Only if you are willing to code it yourself in for e.g. a java sampler -
The default HTTP requests do not have this feature.
See this for some other options -
https://www.blazemeter.com/blog/how-to-load-test-async-requests-with-jmeter
Hi All,
Can you please let me know like what is the best way to put delay between HTTP requests.
In bean shell sampler pre processor I had used "Thread.sleep(millis) " ,
what I observed was if I run using one user and after coming of the
response it sleeps for the specified time and then sends.
Is there anything where we can send requests exactly at the specified time
without considering the response time of the previous requests.
For example : I submitted a HTTP request with one user at 1:00:00 PM and
the response came at 1:00:50 PM , now my thread will sleep (let say delay
of 60 seconds) and fire another http request at 1:01:50 Pm but my
requirement is to fire the request at exactly 1:01:00 PM rather than
considering the 50 seconds of response time.
Is there any way of achieving this?
Also please let me know if in JMeter its possible to submit requests asynchronously?
Regards,
Soumya
******************************************************************************************
This message may contain confidential or proprietary information intended
only for the use of the
addressee(s) named above or may contain information that is legally privileged. If you are
not the intended addressee, or the person responsible for delivering it to
the intended addressee,
you are hereby notified that reading, disseminating, distributing or
copying this message is strictly
prohibited. If you have received this message by mistake, please immediately notify us by
replying to the message and delete the original message and any copies
immediately thereafter.
If you received this email as a commercial message and would like to opt
out of future commercial
messages, please let us know and we will remove you from our distribution list.
Thank you.~
******************************************************************************************
FAFLD
g***@live.com
2018-09-20 14:35:27 UTC
Permalink
You must be looking for implementation of dynamic pacing
<https://www.quora.com/What-is-the-difference-between-think-time-and-pacing-in-performance-testing>
which can be done using some Groovy scripting in the JSR223 Timer
<https://www.blazemeter.com/blog/how-to-easily-implement-pacing-jmeter>




--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

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

Loading...