Skip to content

Commit f477fe8

Browse files
committed
fixup! Use profiling.sampling in the documentation (PEP 799)
1 parent e25ed74 commit f477fe8

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Doc/library/profile.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The Python standard library provides three different profiling implementations:
2828

2929
**Statistical Profiler:**
3030

31-
1. :mod:`profiling.sampling` provides statistical profiling of running Python processes
31+
1. :mod:`!profiling.sampling` provides statistical profiling of running Python processes
3232
using periodic stack sampling. It can attach to any running Python process without
3333
requiring code modification or restart, making it ideal for production debugging.
3434

@@ -74,7 +74,7 @@ The Python standard library provides three different profiling implementations:
7474

7575
.. note::
7676

77-
The statistical profiler (:mod:`profiling.sampling`) is recommended for most production
77+
The statistical profiler (:mod:`!profiling.sampling`) is recommended for most production
7878
use cases due to its extremely low overhead and ability to profile running processes
7979
without modification. It can attach to any Python process and collect performance
8080
data with minimal impact on execution speed, making it ideal for debugging
@@ -220,7 +220,7 @@ Statistical Profiler Command Line Interface
220220

221221
.. program:: profiling.sampling
222222

223-
The :mod:`profiling.sampling` module can be invoked as a script to profile running processes::
223+
The :mod:`!profiling.sampling` module can be invoked as a script to profile running processes::
224224

225225
python -m profiling.sampling [options] PID
226226

@@ -339,13 +339,13 @@ The statistical profiler produces output similar to deterministic profilers but
339339

340340
.. _profile-cli:
341341

342-
:mod:`profiling.sampling` Module Reference
342+
:mod:`!profiling.sampling` Module Reference
343343
=======================================================
344344

345345
.. module:: profiling.sampling
346346
:synopsis: Python statistical profiler.
347347

348-
This section documents the programmatic interface for the :mod:`profiling.sampling` module.
348+
This section documents the programmatic interface for the :mod:`!profiling.sampling` module.
349349
For command-line usage, see :ref:`sampling-profiler-cli`. For conceptual information
350350
about statistical profiling, see :ref:`statistical-profiling`
351351

@@ -856,7 +856,7 @@ What Is Deterministic Profiling?
856856
call*, *function return*, and *exception* events are monitored, and precise
857857
timings are made for the intervals between these events (during which time the
858858
user's code is executing). In contrast, :dfn:`statistical profiling` (which is
859-
provided by the :mod:`profiling.sampling` module) periodically samples the effective instruction pointer, and
859+
provided by the :mod:`!profiling.sampling` module) periodically samples the effective instruction pointer, and
860860
deduces where time is being spent. The latter technique traditionally involves
861861
less overhead (as the code does not need to be instrumented), but provides only
862862
relative indications of where time is being spent.

Doc/whatsnew/3.15.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ New features
7575
High frequency statistical sampling profiler
7676
--------------------------------------------
7777

78-
A new statistical sampling profiler has been added to the :mod:`profile` module as
79-
:mod:`profiling.sampling`. This profiler enables low-overhead performance analysis of
78+
A new statistical sampling profiler has been added to the new :mod:`!profiling` module as
79+
:mod:`!profiling.sampling`. This profiler enables low-overhead performance analysis of
8080
running Python processes without requiring code modification or process restart.
8181

8282
Unlike deterministic profilers (:mod:`cProfile` and :mod:`profile`) that instrument

0 commit comments

Comments
 (0)