|
1 | | -.. _profiling: |
| 1 | +.. _profiling-module: |
2 | 2 |
|
3 | 3 | *************************************** |
4 | 4 | :mod:`profiling` --- Python Profilers |
@@ -80,22 +80,22 @@ function calls. |
80 | 80 |
|
81 | 81 | The following table summarizes the key differences: |
82 | 82 |
|
83 | | -+-------------------+--------------------------+----------------------+ |
84 | | -| Feature | Statistical Sampling | Deterministic | |
85 | | -| | (:mod:`profiling.sampling`) | (:mod:`profiling.tracing`) | |
86 | | -+===================+==========================+======================+ |
87 | | -| **Target** | Running process | Code you run | |
88 | | -+-------------------+--------------------------+----------------------+ |
89 | | -| **Overhead** | Virtually none | Moderate | |
90 | | -+-------------------+--------------------------+----------------------+ |
91 | | -| **Accuracy** | Statistical estimate | Exact call counts | |
92 | | -+-------------------+--------------------------+----------------------+ |
93 | | -| **Setup** | Attach to any PID | Instrument code | |
94 | | -+-------------------+--------------------------+----------------------+ |
95 | | -| **Use Case** | Production debugging | Development/testing | |
96 | | -+-------------------+--------------------------+----------------------+ |
97 | | -| **Implementation**| C extension | C extension | |
98 | | -+-------------------+--------------------------+----------------------+ |
| 83 | ++--------------------+------------------------------+------------------------------+ |
| 84 | +| Feature | Statistical Sampling | Deterministic | |
| 85 | +| | (:mod:`profiling.sampling`) | (:mod:`profiling.tracing`) | |
| 86 | ++====================+==============================+==============================+ |
| 87 | +| **Target** | Running process | Code you run | |
| 88 | ++--------------------+------------------------------+------------------------------+ |
| 89 | +| **Overhead** | Virtually none | Moderate | |
| 90 | ++--------------------+------------------------------+------------------------------+ |
| 91 | +| **Accuracy** | Statistical estimate | Exact call counts | |
| 92 | ++--------------------+------------------------------+------------------------------+ |
| 93 | +| **Setup** | Attach to any PID | Instrument code | |
| 94 | ++--------------------+------------------------------+------------------------------+ |
| 95 | +| **Use Case** | Production debugging | Development/testing | |
| 96 | ++--------------------+------------------------------+------------------------------+ |
| 97 | +| **Implementation** | C extension | C extension | |
| 98 | ++--------------------+------------------------------+------------------------------+ |
99 | 99 |
|
100 | 100 |
|
101 | 101 | When to Use Statistical Sampling |
@@ -227,14 +227,14 @@ filename:lineno(function) |
227 | 227 | Legacy Compatibility |
228 | 228 | ==================== |
229 | 229 |
|
230 | | -For backward compatibility, the :mod:`cProfile` module remains available as an |
| 230 | +For backward compatibility, the ``cProfile`` module remains available as an |
231 | 231 | alias to :mod:`profiling.tracing`. Existing code using ``import cProfile`` will |
232 | 232 | continue to work without modification in all future Python versions. |
233 | 233 |
|
234 | 234 | .. deprecated:: 3.15 |
235 | 235 |
|
236 | 236 | The pure Python :mod:`profile` module is deprecated and will be removed in |
237 | | - Python 3.17. Use :mod:`profiling.tracing` (or its alias :mod:`cProfile`) |
| 237 | + Python 3.17. Use :mod:`profiling.tracing` (or its alias ``cProfile``) |
238 | 238 | instead. See :mod:`profile` for migration guidance. |
239 | 239 |
|
240 | 240 |
|
|
0 commit comments