Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def foo(serverPort, fileName):
- ...
- def main():
- serverPort = 1
- fileName = "abc"
- cmd = "foo(" + str(serverPort) + ",\"" + fileName + "\")"
- totalTime = timeit.timeit(cmd, 'from __main__ import foo', number=10)
- print "Average time: %f seconds" % (totalTime/10)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement