Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fee6f33

Browse files
committed
more markup nits
1 parent 69200fa commit fee6f33

1 file changed

Lines changed: 13 additions & 12 deletions

File tree

Doc/lib/libprofile.tex

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,15 @@ \section{Instant Users Manual \label{profile-instant}}
104104
manual.'' It provides a very brief overview, and allows a user to
105105
rapidly perform profiling on an existing application.
106106

107-
To profile an application with a main entry point of \samp{foo()}, you
108-
would add the following to your module:
107+
To profile an application with a main entry point of \function{foo()},
108+
you would add the following to your module:
109109

110110
\begin{verbatim}
111111
import profile
112112
profile.run('foo()')
113113
\end{verbatim}
114114

115-
The above action would cause \samp{foo()} to be run, and a series of
115+
The above action would cause \function{foo()} to be run, and a series of
116116
informative lines (the profile) to be printed. The above approach is
117117
most useful when working with the interpreter. If you would like to
118118
save the results of a profile into a file for later examination, you
@@ -137,8 +137,9 @@ \section{Instant Users Manual \label{profile-instant}}
137137
profile.py [-o output_file] [-s sort_order]
138138
\end{verbatim}
139139

140-
\samp{-s} only applies to stdout (i.e. \samp{-o} is not supplied.
141-
Look in the \class{Stats} documentation for valid sort values.
140+
\programopt{-s} only applies to standard output (\programopt{-o} is
141+
not supplied). Look in the \class{Stats} documentation for valid sort
142+
values.
142143

143144
When you wish to review the profile, you should use the methods in the
144145
\module{pstats} module. Typically you would load the statistics data as
@@ -151,7 +152,7 @@ \section{Instant Users Manual \label{profile-instant}}
151152

152153
The class \class{Stats} (the above code just created an instance of
153154
this class) has a variety of methods for manipulating and printing the
154-
data that was just read into \samp{p}. When you ran
155+
data that was just read into \code{p}. When you ran
155156
\function{profile.run()} above, what was printed was the result of three
156157
method calls:
157158

@@ -199,8 +200,8 @@ \section{Instant Users Manual \label{profile-instant}}
199200
\end{verbatim}
200201

201202
This will sort all the statistics by file name, and then print out
202-
statistics for only the class init methods ('cause they are spelled
203-
with \samp{__init__} in them). As one final example, you could try:
203+
statistics for only the class init methods (since they are spelled
204+
with \code{__init__} in them). As one final example, you could try:
204205

205206
\begin{verbatim}
206207
p.sort_stats('time', 'cum').print_stats(.5, 'init')
@@ -213,7 +214,7 @@ \section{Instant Users Manual \label{profile-instant}}
213214
maintained, and that sub-sub-list is printed.
214215

215216
If you wondered what functions called the above functions, you could
216-
now (\samp{p} is still sorted according to the last criteria) do:
217+
now (\code{p} is still sorted according to the last criteria) do:
217218

218219
\begin{verbatim}
219220
p.print_callers(.5, 'init')
@@ -423,7 +424,7 @@ \subsection{The \class{Stats} Class \label{profile-stats}}
423424

424425
When more than one key is provided, then additional keys are used as
425426
secondary criteria when there is equality in all keys selected
426-
before them. For example, \samp{sort_stats('name', 'file')} will sort
427+
before them. For example, \code{sort_stats('name', 'file')} will sort
427428
all the entries according to their function name, and resolve all ties
428429
(identical function names) by sorting by file name.
429430

@@ -495,14 +496,14 @@ \subsection{The \class{Stats} Class \label{profile-stats}}
495496
\end{verbatim}
496497

497498
would first limit the printing to first 10\% of list, and then only
498-
print functions that were part of filename \samp{.*foo:}. In
499+
print functions that were part of filename \file{.*foo:}. In
499500
contrast, the command:
500501

501502
\begin{verbatim}
502503
print_stats('foo:', .1)
503504
\end{verbatim}
504505

505-
would limit the list to all functions having file names \samp{.*foo:},
506+
would limit the list to all functions having file names \file{.*foo:},
506507
and then proceed to only print the first 10\% of them.
507508
\end{methoddesc}
508509

0 commit comments

Comments
 (0)