Usually I use shell command time. My purpose is to test if data is small, medium, large or very large set, how much time and memory usage will be.
time
Any t
I use a simple decorator to time the func
def st_time(func): """ st decorator to calculate the total time of a func """ def st_func(*args, **keyArgs): t1 = time.time() r = func(*args, **keyArgs) t2 = time.time() print "Function=%s, Time=%s" % (func.__name__, t2 - t1) return r return st_func