RichardMost

Log duration of script execution

5 posts in this topic

#1 ·  Posted

Hello,

I'm a new user to AutoIT. I am attempting to write some simple synthetic benchmarks for a Windows environment. I have a script that I have written that simply opens Microsoft Word, types some text, and then saves the file and exits. I'd like to record the duration of the execution so I can track it on each run as additional background processes are added to the workstation. 

Are there any recommendations for this? Ideally I'd record the duration time to a CSV on a network share for example. 

Thank you,

Richard

 

Share this post


Link to post
Share on other sites



#2 ·  Posted

@RichardMost welcome to the forum. Look at TimerInit() and TimerDiff() in the help file. The example shows you just how to start a timer at the top of your script. Then when you're done, you can get total runtime. You can either use FileWriteLine or the _Excel_ functions to output the data as you would like.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#3 ·  Posted

Just now, JLogan3o13 said:

@RichardMost welcome to the forum. Look at TimerInit() and TimerDiff() in the help file. The example shows you just how to start a timer at the top of your script. Then when you're done, you can get total runtime. You can either use FileWriteLine or the _Excel_ functions to output the data as you would like.

Thanks for the quick heads up! I'll take a peek at those functions and fiddle with it! 

Share this post


Link to post
Share on other sites

#4 ·  Posted

25 minutes ago, JLogan3o13 said:

@RichardMost welcome to the forum. Look at TimerInit() and TimerDiff() in the help file. The example shows you just how to start a timer at the top of your script. Then when you're done, you can get total runtime. You can either use FileWriteLine or the _Excel_ functions to output the data as you would like.

Thanks! This accomplishes exactly what I wanted to do. 

Share this post


Link to post
Share on other sites

#5 ·  Posted

Glad you worked it out :)


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now