Skip to content

Commit c357322

Browse files
committed
Sentence case for headers
1 parent 994e224 commit c357322

File tree

5 files changed

+55
-55
lines changed

5 files changed

+55
-55
lines changed

Doc/library/profile.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _profile:
22

33
****************************************
4-
:mod:`!profile` --- Pure Python Profiler
4+
:mod:`!profile` --- Pure Python profiler
55
****************************************
66

77
.. module:: profile
@@ -199,7 +199,7 @@ extend for custom profiling behavior.
199199

200200
.. _deterministic-profiling:
201201

202-
What Is Deterministic Profiling?
202+
What is deterministic profiling?
203203
================================
204204

205205
:dfn:`Deterministic profiling` is meant to reflect the fact that all *function

Doc/library/profiling-sampling.rst

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
.. _profiling-sampling:
44

55
***************************************************
6-
:mod:`profiling.sampling` --- Statistical Profiler
6+
:mod:`profiling.sampling` --- Statistical profiler
77
***************************************************
88

99
.. module:: profiling.sampling
@@ -28,7 +28,7 @@ process, overhead is virtually zero, making this profiler suitable for both
2828
development and production environments.
2929

3030

31-
What Is Statistical Profiling?
31+
What is statistical profiling?
3232
==============================
3333

3434
Statistical profiling builds a picture of program behavior by periodically
@@ -64,7 +64,7 @@ deterministic profiling overhead would be unacceptable. For exact call counts
6464
and complete call graphs, use :mod:`profiling.tracing` instead.
6565

6666

67-
Quick Examples
67+
Quick examples
6868
==============
6969

7070
Profile a script and see the results immediately::
@@ -103,7 +103,7 @@ The profiler operates through two subcommands that determine how to obtain
103103
the target process.
104104

105105

106-
The ``run`` Command
106+
The ``run`` command
107107
-------------------
108108

109109
The ``run`` command launches a Python script or module and profiles it from
@@ -121,7 +121,7 @@ profiled program::
121121
python -m profiling.sampling run script.py --config settings.yaml
122122

123123

124-
The ``attach`` Command
124+
The ``attach`` command
125125
----------------------
126126

127127
The ``attach`` command connects to an already-running Python process by its
@@ -138,7 +138,7 @@ On most systems, attaching to another process requires appropriate permissions.
138138
On Linux, you may need to run as root or adjust the ``ptrace_scope`` setting.
139139

140140

141-
Sampling Configuration
141+
Sampling configuration
142142
======================
143143

144144
Before exploring the various output formats and visualization options, it is
@@ -171,7 +171,7 @@ The default configuration works well for most use cases:
171171
- No live statistics display during profiling
172172

173173

174-
Sampling Interval and Duration
174+
Sampling interval and duration
175175
------------------------------
176176

177177
The two most fundamental parameters are the sampling interval and duration.
@@ -200,7 +200,7 @@ a program that runs for a fixed time, you may want to set the duration to
200200
match or exceed the expected runtime.
201201

202202

203-
Thread Selection
203+
Thread selection
204204
----------------
205205

206206
Python programs often use multiple threads, whether explicitly through the
@@ -219,7 +219,7 @@ This option is particularly useful when investigating concurrency issues or
219219
when work is distributed across a thread pool.
220220

221221

222-
Special Frames
222+
Special frames
223223
--------------
224224

225225
The profiler can inject artificial frames into the captured stacks to provide
@@ -249,7 +249,7 @@ see substantial time in ``<GC>`` frames, consider investigating object
249249
allocation rates or using object pooling.
250250

251251

252-
Real-Time Statistics
252+
Real-time statistics
253253
--------------------
254254

255255
The ``--realtime-stats`` option displays sampling rate statistics during
@@ -262,15 +262,15 @@ if the profiler cannot keep up. The statistics help verify that profiling is
262262
working correctly and that sufficient samples are being collected.
263263

264264

265-
Profiling Modes
265+
Profiling modes
266266
===============
267267

268268
The sampling profiler supports three modes that control which samples are
269269
recorded. The mode determines what the profile measures: total elapsed time,
270270
CPU execution time, or time spent holding the Global Interpreter Lock.
271271

272272

273-
Wall-Clock Mode
273+
Wall-clock mode
274274
---------------
275275

276276
Wall-clock mode (``--mode=wall``) captures all samples regardless of what the
@@ -290,7 +290,7 @@ function. This is often exactly what you want when optimizing end-to-end
290290
latency.
291291

292292

293-
CPU Mode
293+
CPU mode
294294
--------
295295

296296
CPU mode (``--mode=cpu``) records samples only when the thread is actually
@@ -308,7 +308,7 @@ and network calls, CPU mode reveals which computational sections are most
308308
expensive.
309309

310310

311-
GIL Mode
311+
GIL mode
312312
--------
313313

314314
GIL mode (``--mode=gil``) records samples only when the thread holds Python's
@@ -327,15 +327,15 @@ single-threaded programs or for code that releases the GIL (such as many
327327
NumPy operations or I/O calls).
328328

329329

330-
Output Formats
330+
Output formats
331331
==============
332332

333333
The profiler produces output in several formats, each suited to different
334334
analysis workflows. The format is selected with a command-line flag, and
335335
output goes to stdout, a file, or a directory depending on the format.
336336

337337

338-
pstats Format
338+
pstats format
339339
-------------
340340

341341
The pstats format (``--pstats``) produces a text table similar to what
@@ -390,7 +390,7 @@ The ``--no-summary`` option suppresses the header summary that precedes the
390390
statistics table.
391391

392392

393-
Collapsed Stacks Format
393+
Collapsed stacks format
394394
-----------------------
395395

396396
Collapsed stacks format (``--collapsed``) produces one line per unique call
@@ -418,7 +418,7 @@ The resulting SVG can be viewed in any web browser and provides an interactive
418418
visualization where you can click to zoom into specific call paths.
419419

420420

421-
Flame Graph Format
421+
Flame graph format
422422
------------------
423423

424424
Flame graph format (``--flamegraph``) produces a self-contained HTML file with
@@ -452,7 +452,7 @@ at the top indicate functions that consume significant time either directly
452452
or through their callees.
453453

454454

455-
Gecko Format
455+
Gecko format
456456
------------
457457

458458
Gecko format (``--gecko``) produces JSON output compatible with the Firefox
@@ -486,7 +486,7 @@ For this reason, the ``--mode`` option is not available with Gecko format;
486486
all relevant data is captured automatically.
487487

488488

489-
Heatmap Format
489+
Heatmap format
490490
--------------
491491

492492
Heatmap format (``--heatmap``) generates an interactive HTML visualization
@@ -527,7 +527,7 @@ intuitive view that shows exactly where time is spent without requiring
527527
interpretation of hierarchical visualizations.
528528

529529

530-
Live Mode
530+
Live mode
531531
=========
532532

533533
Live mode (``--live``) provides a terminal-based real-time view of profiling
@@ -584,7 +584,7 @@ Live mode is incompatible with output format options (``--collapsed``,
584584
interface rather than producing file output.
585585

586586

587-
Async-Aware Profiling
587+
Async-aware profiling
588588
=====================
589589

590590
For programs using :mod:`asyncio`, the profiler offers async-aware mode
@@ -623,7 +623,7 @@ Command Line Reference
623623
The complete command-line interface for reference.
624624

625625

626-
Global Options
626+
Global options
627627
--------------
628628

629629
.. option:: run
@@ -635,7 +635,7 @@ Global Options
635635
Attach to and profile a running process by PID.
636636

637637

638-
Sampling Options
638+
Sampling options
639639
----------------
640640

641641
.. option:: -i <microseconds>, --interval <microseconds>
@@ -667,7 +667,7 @@ Sampling Options
667667
Enable async-aware profiling for asyncio programs.
668668

669669

670-
Mode Options
670+
Mode options
671671
------------
672672

673673
.. option:: --mode <mode>
@@ -681,7 +681,7 @@ Mode Options
681681
Requires ``--async-aware``.
682682

683683

684-
Output Options
684+
Output options
685685
--------------
686686

687687
.. option:: --pstats
@@ -712,7 +712,7 @@ Output Options
712712
named ``heatmap_PID``.
713713

714714

715-
pstats Display Options
715+
pstats display options
716716
----------------------
717717

718718
These options apply only to pstats format output.
@@ -731,7 +731,7 @@ These options apply only to pstats format output.
731731
Omit the Legend and Summary of Interesting Functions sections from output.
732732

733733

734-
Run Command Options
734+
Run command options
735735
-------------------
736736

737737
.. option:: -m, --module

Doc/library/profiling-tracing.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _profiling-tracing:
22

33
****************************************************
4-
:mod:`profiling.tracing` --- Deterministic Profiler
4+
:mod:`profiling.tracing` --- Deterministic profiler
55
****************************************************
66

77
.. module:: profiling.tracing
@@ -38,7 +38,7 @@ testing scenarios.
3838
cProfile.run('my_function()')
3939

4040

41-
What Is Deterministic Profiling?
41+
What is deterministic profiling?
4242
================================
4343

4444
:dfn:`Deterministic profiling` captures every function call, function return,
@@ -74,7 +74,7 @@ allows direct comparison of recursive and iterative implementations.
7474

7575
.. _profiling-tracing-cli:
7676

77-
Command Line Interface
77+
Command-line interface
7878
======================
7979

8080
.. program:: profiling.tracing
@@ -111,14 +111,14 @@ results to standard output (or saves them to a file).
111111
The ``-m`` option for :mod:`profile`.
112112

113113

114-
Programmatic Usage Examples
114+
Programmatic usage examples
115115
===========================
116116

117117
For more control over profiling, use the module's functions and classes
118118
directly.
119119

120120

121-
Basic Profiling
121+
Basic profiling
122122
---------------
123123

124124
The simplest approach uses the :func:`run` function::
@@ -162,7 +162,7 @@ The :class:`Profile` class also works as a context manager::
162162
pr.print_stats()
163163

164164

165-
Module Reference
165+
Module reference
166166
================
167167

168168
.. currentmodule:: profiling.tracing
@@ -264,7 +264,7 @@ Module Reference
264264
profiling, no results will be available.
265265

266266

267-
Using a Custom Timer
267+
Using a custom timer
268268
====================
269269

270270
The :class:`Profile` class accepts a custom timing function, allowing you to

0 commit comments

Comments
 (0)