[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jmeter-user
Subject:    Re: Question about multiple instances of a thread group with a critical section controller
From:       Dmitri T <glinius () live ! com>
Date:       2021-11-10 16:41:44
Message-ID: MWHPR1201MB0255C4B7DCA6D56F631B8323C0939 () MWHPR1201MB0255 ! namprd12 ! prod ! outlook ! com
[Download RAW message or body]

By default each JMeter thread (virtual user) executes samplers *upside 
down* (unless you use Logic Controllers 
<https://jmeter.apache.org/usermanual/component_reference.html#logic_controllers> 
to amend this behaviour)

It means that if you have 4 HTTP Calls like:

  * HTTP Call 1
  * HTTP Call 2
  * HTTP Call 3
  * HTTP Call 4

JMeter will run them sequentially, there is no need to use either 
Critical Section Controller or Synchronizing Timer or whatever.

Just remember about JMeter Scoping Rules 
<https://www.blazemeter.com/blog/jmeter-scoping-rules-the-ultimate-guide/> 
and JMeter Variables 
<https://jmeter.apache.org/usermanual/functions.html>specifics, i.e. if 
you have a Post-Processor extracting something applied to all Samplers - 
only last value will be written to the variable. And if you use the same 
variable name in 2 separate Post-Processors - the latter one will 
overwrite the previous value.



On 11/10/2021 5:26 PM, SMITH Lindi wrote:
> 
> Hello
> 
> I wonder if anyone could help me with a load test I'm trying to set up 
> at the moment.
> 
> The test I'm writing has 3 HTTP calls which have to be made before a 
> 4^th HTTP call can be made (the 4^th call is dependent on the previous 
> 3 calls having been run and needs their responses in order to bring 
> back a successful response.)
> 
> So after looking online, I have put my calls under a ‘Critical section 
> controller' , which is working fine and the 4^th call is now passing 
> and getting a successful response.
> 
> My issue is that as soon as I try to run this test with more than 1 
> thread group (user) , it is essentially behaving as a series of 
> sequential calls, where calls 1-4 of the first thread group (user 
> count) will run before the next calls 1-4 of the following user count 
> will run. Obviously this is not very indicative of how things might go 
> in production, as there might be say 2 or 3 users at any given time 
> doing the actions at the same time, but where their individual subset 
> of actions are being called in a critical order.
> 
> Is there anything I can use on my test plan to fire off say 2 or 3 of 
> the same thread groups at the same time, but within the thread group I 
> have my critical section controller with the HTTP requests underneath 
> it to ensure the calls are being made in a concurrent order?
> 
> I saw there is something called ‘synchronizing timers' but when I 
> looked this up, it didn't seem it could be used in conjunction with 
> the ‘critical section controller'.
> 
> Any ideas would be greatly appreciated
> 
> Many thanks
> 
> Lindi
> 
> 
> *Lindi**SMITH*
> Application Developer
> *
> T*| *M *
> *_Lindi.Smith@aldautomotive.com <mailto:Lindi.Smith@aldautomotive.com>
> _*
> www.aldautomotive.com
> 
> Oakwood Drive, Emersons Green
> Bristol, BS16 7LB
> United Kingdom
> 
> As a result of the measures announced by the Government we have 
> implemented a remote working operating model. We would like to 
> reassure all our customers that during this time we will do everything 
> we can to maintain service levels and minimise disruption.**Thank you 
> in advance for your patience and understanding.
> 
> Follow us 
> on  @ALDAutomotiveUK<https://twitter.com/aldautomotiveuk?lang=en><https://twitter.com/ALDAutomotiveUK><https://twitter.com/aldautomotiveuk?lang=en> \
>  <https://www.linkedin.com/company/ald-automotive-uk><https://www.linkedin.com/compa \
> ny/ald-automotive-uk><https://www.linkedin.com/company/ald-automotive><https://www.linkedin.com/company/ald-automotive-uk>
>                 
> *
> 
> *
> 
> We may monitor or record any communication between you and ALD 
> Automotive for quality control and training purposes. This message and 
> any attachments are confidential and intended solely for the 
> addressees. Any unauthorized use or dissemination is prohibited. If 
> you have received this communication in error, please notify the 
> sender either via e-mail, or by telephoning 0117 908 2000 and 
> immediately delete this message and all attachments, plus any copies. 
> E-mails are susceptible to alteration. Neither ALD Automotive nor any 
> of its subsidiaries or affiliates shall be liable for the message if 
> altered, changed or falsified. Although ALD Automotive has taken all 
> reasonable steps to ensure that this communication and any attachments 
> are free from computer viruses, you are advised to take your own steps 
> to ensure that they are actually virus free. ALD Automotive Ltd is 
> registered in England and Wales with registration number 987418 
> England. Registered office is Oakwood Drive, Emersons Green, Bristol, 
> BS16 7LB. VAT number 629 2807 22. ALD Automotive Ltd is authorised and 
> regulated by the Financial Conduct Authority (FRN 308101).
> 
> 


[Attachment #3 (multipart/related)]

[Attachment #5 (text/html)]

<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <p>By default each JMeter thread (virtual user) executes samplers <b>upside
        down</b> (unless you use <a moz-do-not-send="true" \
href="https://jmeter.apache.org/usermanual/component_reference.html#logic_controllers">Logic
  Controllers</a> to amend this behaviour) <br>
    </p>
    <p>It means that if you have 4 HTTP Calls like:</p>
    <ul>
      <li>HTTP Call 1</li>
      <li>HTTP Call 2</li>
      <li>HTTP Call 3</li>
      <li>HTTP Call 4</li>
    </ul>
    <p>JMeter will run them sequentially, there is no need to use either
      Critical Section Controller or Synchronizing Timer or whatever. <br>
    </p>
    <p>Just remember about <a moz-do-not-send="true" \
href="https://www.blazemeter.com/blog/jmeter-scoping-rules-the-ultimate-guide/">JMeter
                
        Scoping Rules</a> and <a moz-do-not-send="true" \
href="https://jmeter.apache.org/usermanual/functions.html">JMeter  Variables \
</a>specifics, i.e. if you have a Post-Processor  extracting something applied to all \
Samplers - only last value  will be written to the variable. And if you use the same \
variable  name in 2 separate Post-Processors - the latter one will overwrite
      the previous value. <br>
    </p>
    <p><br>
    </p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 11/10/2021 5:26 PM, SMITH Lindi
      wrote:<br>
    </div>
    <blockquote type="cite" \
cite="mid:0E5DF4DC4370B24FA318B451AF80DC002C2E2247@uk-mbxbristol3.automotive.ald.socgen">
  
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style>@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;
	mso-fareast-language:EN-US;}a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:#0563C1;
	text-decoration:underline;}a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:#954F72;
	text-decoration:underline;}span.EmailStyle17
	{mso-style-type:personal;
	font-family:"Calibri",sans-serif;
	color:windowtext;}span.EmailStyle18
	{mso-style-type:personal-reply;
	font-family:"Calibri",sans-serif;
	color:#1F497D;}.MsoChpDefault
	{mso-style-type:export-only;
	font-size:10.0pt;}div.WordSection1
	{page:WordSection1;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div>
        <div class="WordSection1">
          <p class="MsoNormal"><span lang="EN-US">Hello<o:p></o:p></span></p>
          <p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
          <p class="MsoNormal"><span lang="EN-US">I wonder if anyone
              could help me with a load test I'm trying to set up at the
              moment.
              <o:p></o:p></span></p>
          <p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
          <p class="MsoNormal"><span lang="EN-US">The test I'm writing
              has 3 HTTP calls which have to be made before a 4<sup>th</sup>
              HTTP call can be made (the 4<sup>th</sup> call is
              dependent on the previous 3 calls having been run and
              needs their responses in order to bring back a successful
              response.) <o:p></o:p></span></p>
          <p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
          <p class="MsoNormal"><span lang="EN-US">So after looking
              online, I have put my calls under a ‘Critical section
              controller' , which is working fine and the 4<sup>th</sup>
              call is now passing and getting a successful response.
              <o:p></o:p></span></p>
          <p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
          <p class="MsoNormal"><span lang="EN-US">My issue is that as
              soon as I try to run this test with more than 1 thread
              group (user) , it is essentially behaving as a series of
              sequential calls, where calls 1-4 of the first thread
              group (user count) will run before the next calls 1-4 of
              the following user count will run. Obviously this is not
              very indicative of how things might go in production, as
              there might be say 2 or 3 users at any given time doing
              the actions at the same time, but where their individual
              subset of actions are being called in a critical \
                order.<o:p></o:p></span></p>
          <p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
          <p class="MsoNormal"><span lang="EN-US">Is there anything I
              can use on my test plan to fire off say 2 or 3 of the same
              thread groups at the same time, but within the thread
              group I have my critical section controller with the HTTP
              requests underneath it to ensure the calls are being made
              in a concurrent order? <o:p></o:p></span></p>
          <p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
          <p class="MsoNormal"><span lang="EN-US">I saw there is
              something called ‘synchronizing timers' but when I looked
              this up, it didn't seem it could be used in conjunction
              with the ‘critical section controller'.<o:p></o:p></span></p>
          <p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
          <p class="MsoNormal"><span lang="EN-US">Any ideas would be
              greatly appreciated<o:p></o:p></span></p>
          <p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
          <p class="MsoNormal"><span lang="EN-US">Many thanks<o:p></o:p></span></p>
          <p class="MsoNormal"><span lang="EN-US">Lindi<o:p></o:p></span></p>
        </div>
      </div>
      <div>&nbsp;</div>
      <div><img id="IMG1" src="cid:part1.bKxHYo0c.LutvvkZY@live.com" class="" \
width="133" height="36" border="0"></div>  <div><br>
        <font face="Arial"><strong><font \
style="font-size:10pt;color:#050B7F;">Lindi</font></strong></font><font size="2" \
color="#050b7f">&nbsp;</font><font face="Arial"><strong><font \
style="font-size:10pt;color:#050B7F;">SMITH</font></strong></font><font size="2" \
                color="#050b7f">&nbsp;<br>
        </font><font face="Arial"><font \
style="font-size:8pt;color:#050B7F;">Application Developer</font></font><font \
size="1" color="#050b7f">&nbsp;<br>  </font><font face="Arial"><font \
                color="#050b7f"><strong><br>
              <font size="1">T</font></strong><font size="1"> \
</font></font></font><font size="1" color="#050b7f">&nbsp;<font face="Arial" \
color="#002060">|</font>  </font><font face="Arial"><strong><font size="1" \
                color="#050b7f">M
            </font></strong></font><font size="1" color="#050b7f">&nbsp;<br>
        </font><font face="Arial"><strong><u><span \
style="font-size:8pt;color:#050B7F;"><a href="mailto:Lindi.Smith@aldautomotive.com" \
title="Click to send email to SMITH Lindi" target="" \
style="font-size:8pt;color:#050B7F;" moz-do-not-send="true"><span \
                style="font-size:8pt;
                    color:#050B7F;">Lindi.Smith@aldautomotive.com</span></a></span><br>
  </u></strong></font><br>
        <font size="1" face="Arial" color="#002060"><a \
class="moz-txt-link-abbreviated" \
                href="http://www.aldautomotive.com">www.aldautomotive.com</a></font><br>
                
        <font size="2" \
color="#050b7f">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
  </font><font size="1" face="Arial" color="#050b7f">Oakwood
          Drive, Emersons Green<br>
          Bristol, BS16 7LB<br>
          United Kingdom</font></div>
      <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
  <font size="2" face="Arial" color="#002060">As a result of the
          measures announced by the Government we have implemented a
          remote working operating model. We would like to reassure all
          our customers that during this time we will do everything we
          can to maintain service levels and minimise disruption.<b> </b>Thank
          you in advance for your patience and understanding.</font>
        <br>
        <br>
      </div>
      <div>
        <div>&nbsp;<font size="1" face="Arial"><font color="#050b7f">Follow
              us on</font><font color="#0070c0">&nbsp;@ALDAutomotiveUK</font><font \
color="#00b0f0">&nbsp;<span style="color:#FFFFFF;"><a \
href="https://twitter.com/aldautomotiveuk?lang=en" title="" target="" \
style="color:#FFFFFF;" moz-do-not-send="true"><span style="color:#FFFFFF;">  \
</span></a></span><span style="color:#FFFFFF;"><a \
href="https://twitter.com/ALDAutomotiveUK" title="" target="" style="color:#FFFFFF;" \
moz-do-not-send="true"><span style="color:#FFFFFF;"></span></a></span><font \
color="#ffffff"><a href="https://twitter.com/aldautomotiveuk?lang=en" target="" \
moz-do-not-send="true"><img style="border:  0px Solid ; " \
src="cid:part2.fIEuS5IZ.0oPCmxiL@live.com" class="" width="30" \
height="24"></a>&nbsp;</font><a \
href="https://www.linkedin.com/company/ald-automotive-uk" target="" \
moz-do-not-send="true"><img style="border: 0px  Solid ; " \
src="cid:part3.Jr5Vj8XS.VuUQ0h5B@live.com" class="" width="34" height="24"></a><a \
href="https://www.linkedin.com/company/ald-automotive-uk" title="" target="" style="" \
moz-do-not-send="true">  </a><span style="color:#FFFFFF;"><a \
href="https://www.linkedin.com/company/ald-automotive" title="" target="" \
style="color:#FFFFFF;" moz-do-not-send="true"><span \
style="color:#FFFFFF;"></span></a></span><span style="color:#FFFFFF;"><a \
href="https://www.linkedin.com/company/ald-automotive-uk" title="" target="" \
style="color:#FFFFFF;" moz-do-not-send="true"><span \
style="color:#FFFFFF;"></span></a></span></font></font></div>  </div>
      <div><font size="1" face="arial" color="#008000"><strong><br>
            <img style="border: 0px Solid ; " \
src="cid:part4.m67efuJh.OOKGd9fI@live.com" class="" width="470" height="139"><br>  \
</strong></font></div>  <div><font size="1" face="Arial" color="#a5a5a5">
        </font><font size="1" face="Arial" color="#a5a5a5"><font size="1" \
face="arial" color="#7f7f7f">  <p><font color="black">We may monitor or record any
                communication between you and ALD Automotive for quality
                control and training purposes. This message and any
                attachments are confidential and intended solely for the
                addressees. Any unauthorized use or dissemination is
                prohibited. If you have received this communication in
                error, please notify the sender either via e-mail, or by
                telephoning 0117 908 2000 and immediately delete this
                message and all attachments, plus any copies. E-mails
                are susceptible to alteration. Neither ALD Automotive
                nor any of its subsidiaries or affiliates shall be
                liable for the message if altered, changed or falsified.
                Although ALD Automotive has taken all reasonable steps
                to ensure that this communication and any attachments
                are free from computer viruses, you are advised to take
                your own steps to ensure that they are actually virus
                free. ALD Automotive Ltd is registered in England and
                Wales with registration number 987418 England.
                Registered office is Oakwood Drive, Emersons Green,
                Bristol, BS16 7LB. VAT number 629 2807 22. ALD
                Automotive Ltd is authorised and regulated by the
                Financial Conduct Authority (FRN 308101).</font></p>
            <br>
          </font>
        </font></div>
      <div>
        <blockquote style="MARGIN-RIGHT: 0px" dir="ltr">
          <div>
          </div>
        </blockquote>
      </div>
    </blockquote>
  </body>
</html>


["image96b92b.JPG" (image/jpeg)]
["imagecb6003.PNG" (image/png)]
["imageb7a47c.PNG" (image/png)]
["image3b3bff.JPG" (image/jpeg)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic