Let's say we got widnows batch file named program.bat with multiple lines of code. We need to measure execution time of variable blocks of this program.
Is there a simple way of determining time spend using small code chagnes ?
For example by modifying program.bat by adding call to function print_duration. Each time this function will be called it will print duration since start of the program.
call read_some_files
call print_duration
for ...
call process_files
call print_duration
with these two lines added to output:
Duration: 2 min
Duration: 8 min