SPONSORS:






User Tag List

Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Jul 2000
    Location
    sanjose,CA,USA
    Posts
    68
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Measuring Time for each action

    Hi
    I am trying to measure time for each action like log in, select item, work on item and
    send item, is it needed to open the timer and close the timer for all 4 actions,
    I think my code needs to refined,can anyone resolve this for me
    Here is the sample code for 2 actions

    HTIMER TotalTimer
    TotalTimer = TimerCreate ()
    TimerStart (TotalTimer)
    Logon.Click()
    If welcomepage.exists()
    TimerStop (TotalTimer)
    Logintime = TimerStr (TotalTimer)
    Print ("Login take in {Logintime} seconds")
    TimerDestroy(TotalTimer)

    HTIMER TotalTimer
    TotalTimer = TimerCreate ()
    TimerStart (TotalTimer)
    SelectItem.Click()
    If DisplayofItems.exists()
    TimerStop (TotalTimer)
    SelectItemtoDisplay = TimerStr (TotalTimer)
    Print ("SelectItem to Display take {SelectItemtoDisplay} seconds")
    TimerDestroy(TotalTimer)

    Thanks
    Sri


    ------------------

  2. #2
    Senior Member
    Join Date
    Dec 2001
    Location
    Bozeman, MT, USA
    Posts
    265
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Measuring Time for each action

    look in the silktest help for TimerCreate function. It has some good examples and information. You will also need the TimerStr function as you have here to get the time in a pretty format.

    ------------------
    Ryan McCullough
    Accelrys Inc.
    ryan@accelrys.com
    Ryan McCullough
    RightNow Tech. Inc.

  3. #3
    Guest

    Re: Measuring Time for each action

    The following statements will calculate the time, total and average, as well. Good luck.

    INTEGER iTimerCount
    REAL rTime


    [ ] TimerStart(tNewTimer)
    [ ] ..........
    [ ] Your actions
    [ ] .........
    [ ] TimerStop (tNewTimer)
    [ ]
    [ ] rTime += TimerValue(tNewFol)
    [ ] REAL rAvgTime = rTime / iTimerCount

    ------------------

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin 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 02:30 AM.

Copyright BetaSoft Inc.