summaryrefslogtreecommitdiffstats
path: root/Doc/lib/libprofile.tex
diff options
context:
space:
mode:
authorNicholas Bastin <nick.bastin@gmail.com>2004-03-23 18:44:39 (GMT)
committerNicholas Bastin <nick.bastin@gmail.com>2004-03-23 18:44:39 (GMT)
commit824b1b2da8238b7b71a6135b727ea68d7bc8c5d2 (patch)
tree6c4f481bc7a3dc1cd2ca91dfcb3bf82ee3ad8363 /Doc/lib/libprofile.tex
parent6fca7cc783bfd5696ca3b47022a62fa10b9ab89b (diff)
downloadcpython-824b1b2da8238b7b71a6135b727ea68d7bc8c5d2.zip
cpython-824b1b2da8238b7b71a6135b727ea68d7bc8c5d2.tar.gz
cpython-824b1b2da8238b7b71a6135b727ea68d7bc8c5d2.tar.bz2
Added command line options for profile.py - one for stats output file
and one for sort order when using stdout. Uses optparse.
Diffstat (limited to 'Doc/lib/libprofile.tex')
-rw-r--r--Doc/lib/libprofile.tex9
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/lib/libprofile.tex b/Doc/lib/libprofile.tex
index 608e1cd..fa0f6b3 100644
--- a/Doc/lib/libprofile.tex
+++ b/Doc/lib/libprofile.tex
@@ -131,6 +131,15 @@ a script to profile another script. For example:
python /usr/local/lib/python1.5/profile.py myscript.py
\end{verbatim}
+\file{profile.py} accepts two optional arguments on the command line:
+
+\begin{verbatim}
+profile.py [-o output_file] [-s sort_order]
+\end{verbatim}
+
+\samp{-s} only applies to stdout (i.e. \samp{-o} is not supplied.
+Look in the \class{Stats} documentation for valid sort values.
+
When you wish to review the profile, you should use the methods in the
\module{pstats} module. Typically you would load the statistics data as
follows: