MCPcopy Create free account
hub / github.com/ActiveState/code / T

Class T

recipes/Python/465831_profiling_threads/recipe-465831.py:73–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71 pass
72
73class T(Thread):
74 def __init__(self):
75 Thread.__init__(self)
76 def run(self): # takes about 5 seconds
77 for i in xrange(100):
78 self.test_method()
79 test_function()
80 def test_method(self):
81 sleep(random.random() / 10)
82
83profile_on()
84#######################

Callers 1

recipe-465831.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected