Time run times of programs

  • It will be very helpful  to find how long some of the user modules run.

    Can this be done? or does anyone have anything that does this

  • The Profiler traces can show Start Time and End Time for statements and batches

    Regards,Yelena Varsha

  • Thanks for your response Yelena

    Would prefer other means different from profiler .

  • For performance testing I created a database where I could record timestamps as well as the location within the application. That gave me a way to collect runtime information for each segment and report on aggregate results to measure consistency.

    ------------
    Buy the ticket, take the ride. -- Hunter S. Thompson

  • Do you mind sharing how that was done?

  • Make a table something like:

    create table TimeLog(

    EventDT datetime not null,

    StartStop varchar(5) not null,

    AppName varchar(25) not null,

    Info varchar(200) null

    )

     

    Then at the start of the process you want to time:

    insert into TimeLog (EventDT, StartStop, AppName, Info)

    values (getdate(), "Start", "Process X", "Info about the start call")

    then you run the process here

    and when its complete:

    insert into TimeLog (EventDT, StartStop, AppName, Info)

    values (getdate(), "Stop", "Process X", "Completed")

     

    Of course this assumes you own the process you want to get timing info for.  If you're feeling like something a little fancier, you could add an Identity column and a EventCompleteDT.  Then change the second insert into an update to fill in the EventCompleteDT value.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply