Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Code Block
from java.lang import System

#right before an execution
start = System.currentTimeMillis()
< code block where something is executed >
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:

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