Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup! Use profiling.sampling in the documentation (PEP 799)
  • Loading branch information
AA-Turner committed Sep 2, 2025
commit f477fe877a912983c6a72bf9f11b2799d20f1b13
12 changes: 6 additions & 6 deletions Doc/library/profile.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The Python standard library provides three different profiling implementations:

**Statistical Profiler:**

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

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

.. note::

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

.. program:: profiling.sampling

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

python -m profiling.sampling [options] PID

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

.. _profile-cli:

:mod:`profiling.sampling` Module Reference
:mod:`!profiling.sampling` Module Reference
=======================================================

.. module:: profiling.sampling
:synopsis: Python statistical profiler.

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

Expand Down Expand Up @@ -856,7 +856,7 @@ What Is Deterministic Profiling?
call*, *function return*, and *exception* events are monitored, and precise
timings are made for the intervals between these events (during which time the
user's code is executing). In contrast, :dfn:`statistical profiling` (which is
provided by the :mod:`profiling.sampling` module) periodically samples the effective instruction pointer, and
provided by the :mod:`!profiling.sampling` module) periodically samples the effective instruction pointer, and
deduces where time is being spent. The latter technique traditionally involves
less overhead (as the code does not need to be instrumented), but provides only
relative indications of where time is being spent.
Expand Down
4 changes: 2 additions & 2 deletions Doc/whatsnew/3.15.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ New features
High frequency statistical sampling profiler
--------------------------------------------

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

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