How to Measure Time Taken to Run a Command Line Program

Editor Ratings:
User Ratings:
[Total: 0 Average: 0]

To measure the time taken to run a command line program there is a free command line utility named TimedExec which lets you benchmark command line programs. For example you can execute any program with command line arguments and then measure the time taken to execute that program.

Every program takes different execution time at different instances. This is because of environmental noise. To avoid this, this software runs the same program multiple times to get the average execution value. This utility to measure time taken to execute command line programs is pretty simple to use, and you don’t have to tinkle around with its parameters; the default parameters are good enough.

timedexec main

How to Measure the Time Taken by Command Line Program:

First, you have to download TimedExec command line tool from the link provided. Now extract the ZIP contents to any folder and start the command prompt on this folder. You can do this by browsing the folder containing “TimedExec.exe” and now press “Shift + Right Click” on the empty area of this folder and choose “Open command window here” from context menu.

After opening the command prompt, you can call any command line program to start benchmarking. For example you can check the average time taken by ping command to execute the complete process:

TimedExec.exe C:\Windows\System32\ping.exe -n 5

ping command benchmarking using TimedExec

In the above example ping command is checking the packet status 5 times for and TimedExec is measuring the time taken to complete the process. Once you execute this program, this is what it does:

  1. First it will do 3 warm passes. These are done to prevent caching effects of execution.
  2. After that, it will do 10 execution passes, and will measure time for these.
  3. Once done, it will show all the information on the screen. You can see the following info:
    • Mean execution time
    • Time for slowest pass
    • Time for Fastest pass
  4. It also creates a log file, with similar info.

Also see: How to Run Multiple Ping commands in parallel.

In other example I am checking the time taken by FFMpeg.exe to show its help onscreen using TimedExec.exe. The syntax will look like this below code:

TimedExec.exe C:\Downloads\ffmpeg\bin\ffmpeg.exe --help

ffmpeg benchmarking using timedexec

You have to provide the full path with arguments of the command line program you want to check for measuring the time taken for its execution.

Final Words:

This simple command line utility helps you to measure the time taken to run a command line program. It benchmarks the command line program and provide a detailed information about the chosen program. Log file is also generated after every successful execution.

You can also try command line text to PDF converter.

Editor Ratings:
User Ratings:
[Total: 0 Average: 0]
Works With: Windows
Free/Paid: Free

Leave A Reply


Get 100 GB FREE

Provide details to get this offer