Home > SQR > Time taken by a procedure in SQR

Time taken by a procedure in SQR

While testing, you might want to know how much time a particular procedure or a step in sqr is taking. You may use the following to know the time spent by a procedure or a step.

Begin-Program
let $start_time = edit(datenow(), ‘DD/MM/YYYY-HH:MI:SS:NNNN’)
   do any-procedure-or-step
let $end_time = edit(datenow(), ‘DD/MM/YYYY-HH:MI:SS:NNNN’)
let #total_time = datediff(strtodate($end_time,’DD/MM/YYYY-HH:MI:SS:NNNN’), strtodate($start_time,’DD/MM/YYYY-HH:MI:SS:NNNN’),’minute’)
#debugy show ‘total time taken by the Program = ‘ #total_time  ‘ minutes’
End-Program

Advertisements
Categories: SQR Tags:
  1. K Mani
    April 16, 2012 at 5:43 am

    Very Useful.
    Thank u

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: