Here i'm trying to profile four functions from numstring module
from numstring import * #loading functions to profile
import timeit
def profile_timeit():
funcs_list = [numbers_string1, numbers_string2, numbers_string3, num_strings4]
for i in funcs_list:
for count in [10, 100, 1000, 10000]:
actuals = timeit.timeit(stmt='i(count)', number=4,
setup='from __main__ import *')
print "{0} count = {1} \t min = {2} \t actuals = {3}".format(i,count,min(actuals), actuals)
print "\n"
if __name__ == "__main__":
profile_timeit()
In the code
setup = 'from __main__ import *'
I'm trying to load the stament variables to get my job done but some how it fails. Can anybody help...Thanks in advance