definition of sub-functions in the hotshot profiler

L

Lars Woetmann

what is the definition of sub-functions in the hotshot profiler? and just
as important what is not sub-functions

from the output I can see that functions I made and functions in
/usr/lib/python2.4/textwrap.py is considered sub-functions, but I call a
lot of other functions in the python library and they are not in the
output, so how come textwrap is?


--code

import hotshot, hotshot.stats
prof = hotshot.Profile("openAnswerWindow.prof")
prof.runcall(self.openAnswerWindow)
prof.close()
stats = hotshot.stats.load("openAnswerWindow.prof")
stats.sort_stats('time', 'calls')
stats.print_stats()

--output

195 function calls in 0.005 CPU seconds

Ordered by: internal time, call count

ncalls tottime percall cumtime percall filename:lineno(function)
1 0.001 0.001 0.005 0.005 /home/lars/skole/scriptsprog/rapport/code/m/kw/KeywordWindow.py:399(openAnswerWindow)
18 0.001 0.000 0.002 0.000 m/kw/AnswerWindow.py:22(setText)
9 0.001 0.000 0.001 0.000 include/FancyListViewItem.py:7(__init__)
1 0.000 0.000 0.003 0.003 m/kw/AnswerWindow.py:53(setQuestionItem)
18 0.000 0.000 0.001 0.000 /usr/lib/python2.4/textwrap.py:292(wrap)
18 0.000 0.000 0.000 0.000 /usr/lib/python2.4/textwrap.py:265(wrap)
9 0.000 0.000 0.001 0.000 m/kw/AnswerWindow.py:11(__init__)
18 0.000 0.000 0.000 0.000 /usr/lib/python2.4/textwrap.py:94(__init__)
9 0.000 0.000 0.001 0.000 /home/lars/skole/scriptsprog/rapport/code/include/IntColumnListViewItem.py:7(__init__)
36 0.000 0.000 0.000 0.000 m/kw/AnswerWindow.py:29(text)
1 0.000 0.000 0.000 0.000 /home/lars/skole/scriptsprog/rapport/code/m/kw/QuestionSetModel.py:378(getAllAnswers)
18 0.000 0.000 0.000 0.000 /usr/lib/python2.4/textwrap.py:131(_split)
18 0.000 0.000 0.000 0.000 /usr/lib/python2.4/textwrap.py:114(_munge_whitespace)
18 0.000 0.000 0.000 0.000 /usr/lib/python2.4/textwrap.py:192(_wrap_chunks)
2 0.000 0.000 0.000 0.000 m/kw/AnswerWindow.py:48(setTitle)
1 0.000 0.000 0.000 0.000 m/kw/AnswerWindow.py:71(clearAll)
0 0.000 0.000 profile:0(profiler)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,783
Latest member
RickeyDort

Latest Threads

Top