Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ActiveState/code
/ run
Method
run
recipes/Python/465831_profiling_threads/recipe-465831.py:76–79 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
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
Callers
3
recipe-466305.py
File · 0.45
recipe-425975.py
File · 0.45
recipe-457670.py
File · 0.45
Calls
3
test_method
Method · 0.95
xrange
Class · 0.85
test_function
Function · 0.70
Tested by
no test coverage detected