summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/profile.rst9
1 files changed, 6 insertions, 3 deletions
diff --git a/Doc/library/profile.rst b/Doc/library/profile.rst
index 1a772fb..9ceb816 100644
--- a/Doc/library/profile.rst
+++ b/Doc/library/profile.rst
@@ -120,8 +120,8 @@ results to a file by specifying a filename to the :func:`run` function::
The :class:`pstats.Stats` class reads profile results from a file and formats
them in various ways.
-The file :mod:`cProfile` can also be invoked as a script to profile another
-script. For example::
+The files :mod:`cProfile` and :mod:`profile` can also be invoked as a script to
+profile another script. For example::
python -m cProfile [-o output_file] [-s sort_order] (-m module | myscript.py)
@@ -133,7 +133,10 @@ the output by. This only applies when ``-o`` is not supplied.
``-m`` specifies that a module is being profiled instead of a script.
.. versionadded:: 3.7
- Added the ``-m`` option.
+ Added the ``-m`` option to :mod:`cProfile`.
+
+ .. versionadded:: 3.8
+ Added the ``-m`` option to :mod:`profile`.
The :mod:`pstats` module's :class:`~pstats.Stats` class has a variety of methods
for manipulating and printing the data saved into a profile results file::