SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Jul 2008
    Location
    TamilNadu,India
    Posts
    22
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Rendezvous point???

    Is it possible to make 50 VUs concurrently click the Next URL of the application after Login to the application without using WAIT command?


    I set Rendezvous point in the script where i need the first 50VUs has to rendezvous. The code following is i used


    Set flag = 0

    Log "Start iteration"
    ! Create a semaphore for the synchronization
    clear TEST-WIDE semaphore "rendezvousp_pt1"
    Log "Semaphore cleared"

    !Check for the user load
    Acquire TEST-WIDE Mutex "Incr_totalAusers"
    Set UDLV_totalAusers = UDLV_totalAusers + 1
    if (UDLV_totalAusers = 50) then
    Set TEST-WIDE semaphore "rendezvousp_pt1"
    Log "rendezvousp_pt1 cleared"
    set flag = 1
    Release TEST-WIDE Mutex "Incr_totalAusers"
    else
    Release TEST-WIDE Mutex "Incr_totalAusers"
    wait 600000 for semaphore "rendezvousp_pt1" , on timeout goto Label1
    ! this code never gets executed
    Log "Semaphore set"
    end if


    In the above code, i temporarily suspend the script execution for 10 Min by introducing "wait 600000 for semaphore "rendezvousp_pt1" , on timeout goto Label1".


    what happened if 50 users reach the code before 10 min elapsed time?

    if it is the case, the code will be suspended anyway 10 Minutes?

    Is it anyother way exist for once the 50 Vus reach the code then the following code should be executed without any delay?

  2. #2
    Moderator
    Join Date
    Jun 2003
    Location
    Hollis, NH, USA
    Posts
    1,551
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Rendezvous point???

    For some reason, I can't get the wait for semaphore to work on my release. I decided to try to code a simple semaphore without using semaphores and came up with this;

    <font class="small">Code:</font><hr /><pre>!Browser:IE5
    !Date : 3/09/2009
    Environment
    Description ""
    Mode HTTP
    Wait UNIT MILLISECONDS

    Definitions
    ! Standard Defines
    Include "RESPONSE_CODES.INC"
    Include "GLOBAL_VARIABLES.INC"

    CHARACTER*512 USER_AGENT
    Integer USE_PAGE_TIMERS
    CHARACTER*256 MESSAGE
    integer mutexCounter, global

    CONSTANT DEFAULT_HEADERS = "Host: tnstabeast^J" &amp;
    "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; GTB5; SV1; .NET CLR 1" &amp;
    ".1.4322; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)"

    Code
    !Read in the default browser user agent field
    Entry[USER_AGENT,USE_PAGE_TIMERS]

    acquire test-wide mutex "m1"
    set mutexCounter = mutexCounter + 1
    log mutexCounter
    release test-wide mutex "m1"
    loop:
    if (mutexCounter &lt; 50) then
    wait 500
    goto loop
    endif
    </pre><hr />

    You can fine tune the wait 500 (wait 1/2 second) statement. As is, all N (50 in this example) users will start within 500 ms of the 50th user incrementing the mutexCounter variable. set it to less than 500 and you will burn more CPU time on the opensta server but the 50 users will start closer together. Set it larger than 500 and you will consume less CPU waiting but the users wont start as close together. I had the loop delay set to 10 ms and with 49 users waiting (looping), they were using 7% of a Mobile p4 3.06 GHz processor as reported by task manager.

    My test case; 50 Vus running 1 iteration of the above script, introduce users in batches checked, interval between batches 30, num virt users per batch 49, batch ramp 1 second. This ramps up 49 users in 1 second and then have them loop for 30 seconds so I can see the cost of waiting, and then exits after the 50th VU increments the counter.

  3. #3
    Junior Member
    Join Date
    Jul 2008
    Location
    TamilNadu,India
    Posts
    22
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Rendezvous point???

    Thanks Bernie

    Let you know how it works after done that in my script...

  4. #4
    Junior Member
    Join Date
    Feb 2010
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Rendezvous point???

    Hello All,

    I see that this topic started so long, but I think I have another code better.

    Integer totalUsers, global

    Clear semaphore "sm" !use a semaphore, clear it first

    !put this code at anywhere a request
    set totalUsers = totalUsers + 1
    tmo_label: !recheck the condition
    if ( totalUsers = 50) then
    set semaphore "sm"
    else
    wait 6000 for semaphore "sm", ON TIMEOUT GOTO tmo_label
    endif

    !All 50 concurrent VUs will do next line
    ....

    Regards,
    Bao

  5. #5
    Moderator
    Join Date
    Jun 2003
    Location
    Hollis, NH, USA
    Posts
    1,551
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Rendezvous point???

    The wait for semaphore command is broken as far as I know. Are you sure your script works? Does it work if you run it in modeler? Commander? What version of OpenSTA are you using?

  6. #6
    Junior Member
    Join Date
    Feb 2010
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Rendezvous point???

    Yes, it works on my Commander, the OpenSTA version is 1.4.3.20, Commander 1.4.3.2, built May 11 2005. Log below I have from Test Audit Log when I put a Log command after the code to check it. Regards. Bao
    Time Stamp User ID
    --------------------------------
    03/02/10 16:03:02 1-16
    03/02/10 16:03:02 1-25
    03/02/10 16:03:02 1-38
    03/02/10 16:03:02 1-23
    03/02/10 16:03:02 1-39
    03/02/10 16:03:02 1-31
    03/02/10 16:03:02 1-3
    03/02/10 16:03:02 1-24
    03/02/10 16:03:02 1-33
    03/02/10 16:03:02 1-49
    03/02/10 16:03:02 1-4
    03/02/10 16:03:02 1-21
    03/02/10 16:03:02 1-13
    03/02/10 16:03:02 1-22
    03/02/10 16:03:02 1-34
    03/02/10 16:03:02 1-42
    03/02/10 16:03:02 1-45
    03/02/10 16:03:02 1-44
    03/02/10 16:03:02 1-8
    03/02/10 16:03:02 1-18
    03/02/10 16:03:02 1-47
    03/02/10 16:03:02 1-7
    03/02/10 16:03:02 1-41
    03/02/10 16:03:02 1-9
    03/02/10 16:03:02 1-26
    03/02/10 16:03:02 1-1
    03/02/10 16:03:02 1-19
    03/02/10 16:03:02 1-50
    03/02/10 16:03:02 1-28
    03/02/10 16:03:02 1-32
    03/02/10 16:03:02 1-37
    03/02/10 16:03:02 1-15
    03/02/10 16:03:02 1-10
    03/02/10 16:03:02 1-6
    03/02/10 16:03:02 1-46
    03/02/10 16:03:02 1-5
    03/02/10 16:03:02 1-43
    03/02/10 16:03:02 1-17
    03/02/10 16:03:02 1-11
    03/02/10 16:03:02 1-36
    03/02/10 16:03:02 1-2
    03/02/10 16:03:02 1-20
    03/02/10 16:03:02 1-14
    03/02/10 16:03:02 1-48
    03/02/10 16:03:02 1-29
    03/02/10 16:03:02 1-12
    03/02/10 16:03:02 1-30
    03/02/10 16:03:02 1-35
    03/02/10 16:03:02 1-40
    03/02/10 16:03:02 1-27

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 06:52 PM.

Copyright BetaSoft Inc.