Skip to end of metadata
Go to start of metadata

Problem

You want to find out how much time is spent between code (blocks) operation

Solution

simple coding example to print how much time is spent on ..

from java.lang import System

#right before an execution
start = System.currentTimeMillis()
< code block where something is executed >
do_this()
print "Elapsed Time in: do_this() - %d mS" % (System.currentTimeMillis() - start)

# now doing the same for another piece of code like a for loop for example
# reset start
start = System.currentTimeMillis()
for records in loop:
	do_something_else()

print "Elapsed Time in: for loop do_something_else() - %d mS" % (System.currentTimeMillis() - start)


https://www.tutorialspoint.com/java/lang/system_currenttimemillis.htm