Versions Compared

Key

  • 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 >
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)

...