You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by "Nayak, Soumya R." <sn...@firstam.com> on 2018/09/15 04:12:53 UTC

Delay Between Http Requests

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

Re: Delay Between Http Requests

Posted by "glinius@live.com" <gl...@live.com>.
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-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: Delay Between Http Requests

Posted by Deepak Shetty <sh...@gmail.com>.
>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

On Fri, Sep 14, 2018 at 9:13 PM Nayak, Soumya R. <sn...@firstam.com> wrote:

> 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
>

Re: Delay Between Http Requests

Posted by Ivan Rancati <iv...@gmail.com>.
Would a Constant Throughput Timer
http://jmeter.apache.org/usermanual/component_reference.html#Constant_Throughput_Timer
work for you?

Best regards

On Sat, Sep 15, 2018 at 6:13 AM Nayak, Soumya R. <sn...@firstam.com> wrote:

> 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
>

Re: Delay Between Http Requests

Posted by Deepak Goel <de...@gmail.com>.
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

On Sat, 15 Sep 2018, 09:43 Nayak, Soumya R., <sn...@firstam.com> wrote:

> 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
>