mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
typos, layout and other small things
This commit is contained in:
parent
eae3f73b1c
commit
96628a90c4
44 changed files with 174 additions and 120 deletions
|
|
@ -267,17 +267,19 @@ function automatically prints a simple profiling report, sorted by the
|
|||
standard name string (file/line/function-name) that is presented in
|
||||
each line. The following is a typical output from such a call:
|
||||
|
||||
\small{
|
||||
\begin{verbatim}
|
||||
main()
|
||||
2706 function calls (2004 primitive calls) in 4.504 CPU seconds
|
||||
main()
|
||||
2706 function calls (2004 primitive calls) in 4.504 CPU seconds
|
||||
|
||||
Ordered by: standard name
|
||||
Ordered by: standard name
|
||||
|
||||
ncalls tottime percall cumtime percall filename:lineno(function)
|
||||
2 0.006 0.003 0.953 0.477 pobject.py:75(save_objects)
|
||||
43/3 0.533 0.012 0.749 0.250 pobject.py:99(evaluate)
|
||||
...
|
||||
ncalls tottime percall cumtime percall filename:lineno(function)
|
||||
2 0.006 0.003 0.953 0.477 pobject.py:75(save_objects)
|
||||
43/3 0.533 0.012 0.749 0.250 pobject.py:99(evaluate)
|
||||
...
|
||||
\end{verbatim}
|
||||
}
|
||||
|
||||
The first line indicates that this profile was generated by the call:\\
|
||||
\code{profile.run('main()')}, and hence the exec'ed string is
|
||||
|
|
@ -318,6 +320,7 @@ then the latter is the number of primitive calls, and the former is
|
|||
the actual number of calls. Note that when the function does not
|
||||
recurse, these two values are the same, and only the single figure is
|
||||
printed.
|
||||
|
||||
\end{funcdesc}
|
||||
|
||||
\begin{funcdesc}{pstats.Stats}{filename\optional{\, ...}}
|
||||
|
|
@ -480,7 +483,8 @@ return the instance that is being processed, so that the commands can
|
|||
be strung together. For example:
|
||||
|
||||
\begin{verbatim}
|
||||
pstats.Stats('foofile').strip_dirs().sort_stats('cum').print_stats().ignore()
|
||||
pstats.Stats('foofile').strip_dirs().sort_stats('cum') \
|
||||
.print_stats().ignore()
|
||||
\end{verbatim}
|
||||
|
||||
would perform all the indicated functions, but it would not return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue