chunk_id
stringlengths
36
36
source
stringclasses
35 values
source_url
stringlengths
0
290
upstream_license
stringclasses
1 value
document_id
stringlengths
36
36
chunk_index
int64
0
324k
retrieved_at
stringclasses
2 values
chunker_version
stringclasses
4 values
content_hash
stringlengths
15
64
content
stringlengths
50
44.7k
namespace
stringclasses
9 values
source_name
stringclasses
35 values
raw_text
stringlengths
50
44.7k
cleaned_text
stringlengths
50
44.7k
tags
stringclasses
49 values
collection_name
stringclasses
11 values
516f3b4e-a38e-4280-a6d3-d68f805a2180
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,880
supabase-export-v2
93d90027e487c90b
``attach``'s default for this flag is ``running``; ``dump`` defaults to ``all`` because a single snapshot is most useful when it shows the full task graph. ``--blocking`` Pause every thread in the target while reading its stack and resume them after. Guarantees a fully consistent snapshot at the cost of briefly stop...
trusted_official_docs
CPython Docs
``attach``'s default for this flag is ``running``; ``dump`` defaults to ``all`` because a single snapshot is most useful when it shows the full task graph. ``--blocking`` Pause every thread in the target while reading its stack and resume them after. Guarantees a fully consistent snapshot at the cost of briefly stop...
``attach``'s default for this flag is ``running``; ``dump`` defaults to ``all`` because a single snapshot is most useful when it shows the full task graph. ``--blocking`` Pause every thread in the target while reading its stack and resume them after. Guarantees a fully consistent snapshot at the cost of briefly stop...
python, official-docs, cpython, P0
Local_Trusted_Corpus
518302ce-56af-48d3-9637-f7931fe9613d
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,104
supabase-export-v2
ed102db39ebcf523
The Flame Graph visualization shows call stacks as nested rectangles. Functions names are visible in the call hierarchy. .. figure:: tachyon-gecko-opcodes.png :alt: Firefox Profiler Marker Chart with opcodes :align: center :width: 100%
trusted_official_docs
CPython Docs
The Flame Graph visualization shows call stacks as nested rectangles. Functions names are visible in the call hierarchy. .. figure:: tachyon-gecko-opcodes.png :alt: Firefox Profiler Marker Chart with opcodes :align: center :width: 100%
The Flame Graph visualization shows call stacks as nested rectangles. Functions names are visible in the call hierarchy. .. figure:: tachyon-gecko-opcodes.png :alt: Firefox Profiler Marker Chart with opcodes :align: center :width: 100%
python, official-docs, cpython, P0
Local_Trusted_Corpus
51ee1a04-7cf6-491e-b002-f91d10dacf53
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,159
supabase-export-v2
9da48835ffbdf287
seconds (20 Hz, very responsive) to 1.0 second (1 Hz, lower overhead). Faster refresh rates use more CPU. The default is 0.1 seconds (10 Hz). :kbd:`x` Toggle trend indicators that show whether functions are becoming hotter or cooler over time. When enabled, increasing metrics appear in green and decreasing metrics a...
trusted_official_docs
CPython Docs
seconds (20 Hz, very responsive) to 1.0 second (1 Hz, lower overhead). Faster refresh rates use more CPU. The default is 0.1 seconds (10 Hz). :kbd:`x` Toggle trend indicators that show whether functions are becoming hotter or cooler over time. When enabled, increasing metrics appear in green and decreasing metrics a...
seconds (20 Hz, very responsive) to 1.0 second (1 Hz, lower overhead). Faster refresh rates use more CPU. The default is 0.1 seconds (10 Hz). :kbd:`x` Toggle trend indicators that show whether functions are becoming hotter or cooler over time. When enabled, increasing metrics appear in green and decreasing metrics a...
python, official-docs, cpython, P0
Local_Trusted_Corpus
52dc5d0c-9413-448c-8dc1-843bf4aaeec1
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,895
supabase-export-v2
aba28e1da34a6fb7
then extend if you need more statistical accuracy. By default, profiling runs until the target process completes, which is usually sufficient to identify major hotspots. If possible, profile during representative load rather than peak traffic. Profiles collected during normal operation are easier to interpret than thos...
trusted_official_docs
CPython Docs
then extend if you need more statistical accuracy. By default, profiling runs until the target process completes, which is usually sufficient to identify major hotspots. If possible, profile during representative load rather than peak traffic. Profiles collected during normal operation are easier to interpret than thos...
then extend if you need more statistical accuracy. By default, profiling runs until the target process completes, which is usually sufficient to identify major hotspots. If possible, profile during representative load rather than peak traffic. Profiles collected during normal operation are easier to interpret than thos...
python, official-docs, cpython, P0
Local_Trusted_Corpus
52f3d838-a46d-4a93-85f2-4454c9f65eea
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,870
supabase-export-v2
2fc7c5972e9c4053
.. code-block:: text Stack dump for PID 12345, thread 140735 (main thread, has GIL, on CPU; most recent call last): File "server.py", line 28, in serve await handle_request(req) File "handler.py", line 91, in handle_request result = expensive_call(req)
trusted_official_docs
CPython Docs
.. code-block:: text Stack dump for PID 12345, thread 140735 (main thread, has GIL, on CPU; most recent call last): File "server.py", line 28, in serve await handle_request(req) File "handler.py", line 91, in handle_request result = expensive_call(req)
.. code-block:: text Stack dump for PID 12345, thread 140735 (main thread, has GIL, on CPU; most recent call last): File "server.py", line 28, in serve await handle_request(req) File "handler.py", line 91, in handle_request result = expensive_call(req)
python, official-docs, cpython, P0
Local_Trusted_Corpus
53a37c96-c402-43ba-8102-227b75b000c4
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,132
supabase-export-v2
b95460ceda4afb54
This approach has three main benefits: - Sampling runs faster because the work of building data structures for visualization is deferred until replay. - A single binary capture can be converted to multiple output formats without re-profiling: pstats for a quick overview, flame graph for visual exploration, heatmap f...
trusted_official_docs
CPython Docs
This approach has three main benefits: - Sampling runs faster because the work of building data structures for visualization is deferred until replay. - A single binary capture can be converted to multiple output formats without re-profiling: pstats for a quick overview, flame graph for visual exploration, heatmap f...
This approach has three main benefits: - Sampling runs faster because the work of building data structures for visualization is deferred until replay. - A single binary capture can be converted to multiple output formats without re-profiling: pstats for a quick overview, flame graph for visual exploration, heatmap f...
python, official-docs, cpython, P0
Local_Trusted_Corpus
53ac8c2a-f4b4-40c6-9194-a6bfde6006c7
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,098
supabase-export-v2
c44b94608b233384
CPU activity, enabling analysis features specific to Python's threading model. The profiler emits interval markers that appear as colored bands in the Firefox Profiler timeline: - **GIL markers**: show when threads hold or release the global interpreter lock - **CPU markers**: show when threads are executing on CPU ver...
trusted_official_docs
CPython Docs
CPU activity, enabling analysis features specific to Python's threading model. The profiler emits interval markers that appear as colored bands in the Firefox Profiler timeline: - **GIL markers**: show when threads hold or release the global interpreter lock - **CPU markers**: show when threads are executing on CPU ver...
CPU activity, enabling analysis features specific to Python's threading model. The profiler emits interval markers that appear as colored bands in the Firefox Profiler timeline: - **GIL markers**: show when threads hold or release the global interpreter lock - **CPU markers**: show when threads are executing on CPU ver...
python, official-docs, cpython, P0
Local_Trusted_Corpus
53d0c965-03d4-4c8b-9737-496b8b69151a
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,978
supabase-export-v2
4ae45a416e21301b
process is a Python process by probing the process memory for Python runtime structures. Non-Python subprocesses (such as shell commands or external tools) are ignored. There is a limit of 100 concurrent subprocess profilers to prevent resource exhaustion in programs that spawn many processes. If this limit is reached,...
trusted_official_docs
CPython Docs
process is a Python process by probing the process memory for Python runtime structures. Non-Python subprocesses (such as shell commands or external tools) are ignored. There is a limit of 100 concurrent subprocess profilers to prevent resource exhaustion in programs that spawn many processes. If this limit is reached,...
process is a Python process by probing the process memory for Python runtime structures. Non-Python subprocesses (such as shell commands or external tools) are ignored. There is a limit of 100 concurrent subprocess profilers to prevent resource exhaustion in programs that spawn many processes. If this limit is reached,...
python, official-docs, cpython, P0
Local_Trusted_Corpus
54bf7fa1-b137-409e-a021-247e7e13b34a
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,976
supabase-export-v2
82ee7b07e4610b80
With default output, subprocesses produce files like ``flamegraph_12345.html`` or directories like ``heatmap_12345`` - For pstats format (which defaults to stdout), subprocesses produce files like ``profile_12345.pstats`` The subprocess profilers inherit most sampling options from the parent (sampling rate, duration, t...
trusted_official_docs
CPython Docs
With default output, subprocesses produce files like ``flamegraph_12345.html`` or directories like ``heatmap_12345`` - For pstats format (which defaults to stdout), subprocesses produce files like ``profile_12345.pstats`` The subprocess profilers inherit most sampling options from the parent (sampling rate, duration, t...
With default output, subprocesses produce files like ``flamegraph_12345.html`` or directories like ``heatmap_12345`` - For pstats format (which defaults to stdout), subprocesses produce files like ``profile_12345.pstats`` The subprocess profilers inherit most sampling options from the parent (sampling rate, duration, t...
python, official-docs, cpython, P0
Local_Trusted_Corpus
54e70887-769b-4cbf-8bab-d66130ed6e9e
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,032
supabase-export-v2
ab5685283fde7522
Output formats ============== The profiler produces output in several formats, each suited to different analysis workflows. The format is selected with a command-line flag, and output goes to stdout, a file, or a directory depending on the format.
trusted_official_docs
CPython Docs
Output formats ============== The profiler produces output in several formats, each suited to different analysis workflows. The format is selected with a command-line flag, and output goes to stdout, a file, or a directory depending on the format.
Output formats ============== The profiler produces output in several formats, each suited to different analysis workflows. The format is selected with a command-line flag, and output goes to stdout, a file, or a directory depending on the format.
python, official-docs, cpython, P0
Local_Trusted_Corpus
571a2bae-b558-40c8-9439-48512a587014
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,920
supabase-export-v2
a94a24aae2a6f05b
samples recorded) * - Default for ``--realtime-stats`` - Disabled * - Default for ``--subprocesses`` - Disabled * - Default for ``--blocking`` - Disabled (non-blocking sampling) Sampling rate and duration --------------------------
trusted_official_docs
CPython Docs
samples recorded) * - Default for ``--realtime-stats`` - Disabled * - Default for ``--subprocesses`` - Disabled * - Default for ``--blocking`` - Disabled (non-blocking sampling) Sampling rate and duration --------------------------
samples recorded) * - Default for ``--realtime-stats`` - Disabled * - Default for ``--subprocesses`` - Disabled * - Default for ``--blocking`` - Disabled (non-blocking sampling) Sampling rate and duration --------------------------
python, official-docs, cpython, P0
Local_Trusted_Corpus
574d3aea-beba-49db-a524-bfb6dce0845b
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,970
supabase-export-v2
a17dbf287d39ef57
def compute_factorial(n): total = 0 for i in range(50): total += math.factorial(n) return total if __name__ == "__main__": numbers = [5000 + i * 100 for i in range(50)] with ProcessPoolExecutor(max_workers=4) as executor: results = list(executor.map(compute_factorial, numbers)) print(f"Computed {len(results)} facto...
trusted_official_docs
CPython Docs
def compute_factorial(n): total = 0 for i in range(50): total += math.factorial(n) return total if __name__ == "__main__": numbers = [5000 + i * 100 for i in range(50)] with ProcessPoolExecutor(max_workers=4) as executor: results = list(executor.map(compute_factorial, numbers)) print(f"Computed {len(results)} facto...
def compute_factorial(n): total = 0 for i in range(50): total += math.factorial(n) return total if __name__ == "__main__": numbers = [5000 + i * 100 for i in range(50)] with ProcessPoolExecutor(max_workers=4) as executor: results = list(executor.map(compute_factorial, numbers)) print(f"Computed {len(results)} facto...
python, official-docs, cpython, P0
Local_Trusted_Corpus
5762dcf8-cecc-49ee-8bfd-cb4e9a6a10c2
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,977
supabase-export-v2
641078d94096d208
rate, duration, thread selection, native frames, GC frames, async-aware mode, and output format). All Python descendant processes are profiled recursively, including grandchildren and further descendants. Subprocess detection works by periodically scanning for new descendants of the target process and checking whether ...
trusted_official_docs
CPython Docs
rate, duration, thread selection, native frames, GC frames, async-aware mode, and output format). All Python descendant processes are profiled recursively, including grandchildren and further descendants. Subprocess detection works by periodically scanning for new descendants of the target process and checking whether ...
rate, duration, thread selection, native frames, GC frames, async-aware mode, and output format). All Python descendant processes are profiled recursively, including grandchildren and further descendants. Subprocess detection works by periodically scanning for new descendants of the target process and checking whether ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
58051f9a-1111-4ae0-8de3-769e6737e820
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,992
supabase-export-v2
2e839d2944eff124
I/O, blocked on a lock, or sleeping. This makes wall-clock profiling ideal for understanding the overall time distribution in your program, including time spent waiting. If your program spends significant time in I/O operations, network calls, or sleep, wall-clock mode will show these waits as time attributed to the ca...
trusted_official_docs
CPython Docs
I/O, blocked on a lock, or sleeping. This makes wall-clock profiling ideal for understanding the overall time distribution in your program, including time spent waiting. If your program spends significant time in I/O operations, network calls, or sleep, wall-clock mode will show these waits as time attributed to the ca...
I/O, blocked on a lock, or sleeping. This makes wall-clock profiling ideal for understanding the overall time distribution in your program, including time spent waiting. If your program spends significant time in I/O operations, network calls, or sleep, wall-clock mode will show these waits as time attributed to the ca...
python, official-docs, cpython, P0
Local_Trusted_Corpus
586a7fb5-837a-49ad-b6c3-edbe8b8794ca
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,922
supabase-export-v2
796aaa2014c3be25
The two most fundamental parameters are the sampling rate and duration. Together, these determine how many samples will be collected during a profiling session. The :option:`--sampling-rate` option (:option:`-r`) sets how frequently samples are collected. The default is 1 kHz (1,000 samples per second)::
trusted_official_docs
CPython Docs
The two most fundamental parameters are the sampling rate and duration. Together, these determine how many samples will be collected during a profiling session. The :option:`--sampling-rate` option (:option:`-r`) sets how frequently samples are collected. The default is 1 kHz (1,000 samples per second)::
The two most fundamental parameters are the sampling rate and duration. Together, these determine how many samples will be collected during a profiling session. The :option:`--sampling-rate` option (:option:`-r`) sets how frequently samples are collected. The default is 1 kHz (1,000 samples per second)::
python, official-docs, cpython, P0
Local_Trusted_Corpus
58aed219-b5bd-4a1b-99bb-4f35a7daa37c
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,012
supabase-export-v2
514438e4752c25ab
Python bytecode. Since only one thread can hold the GIL at a time, functions that appear frequently in GIL mode profiles are monopolizing the interpreter. GIL mode helps answer questions like "which functions are monopolizing the GIL?" and "why are my other threads starving?" It can also be useful in single-threaded pr...
trusted_official_docs
CPython Docs
Python bytecode. Since only one thread can hold the GIL at a time, functions that appear frequently in GIL mode profiles are monopolizing the interpreter. GIL mode helps answer questions like "which functions are monopolizing the GIL?" and "why are my other threads starving?" It can also be useful in single-threaded pr...
Python bytecode. Since only one thread can hold the GIL at a time, functions that appear frequently in GIL mode profiles are monopolizing the interpreter. GIL mode helps answer questions like "which functions are monopolizing the GIL?" and "why are my other threads starving?" It can also be useful in single-threaded pr...
python, official-docs, cpython, P0
Local_Trusted_Corpus
59ea7b70-9519-4110-9f0a-7cc77d0355d8
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,819
supabase-export-v2
92952e1215f5183b
(5% of total), Tachyon estimates it consumed 5% of the 10-second duration, or about 500 milliseconds. This is a statistical estimate, not a precise measurement. The accuracy of these estimates depends on sample count. With 100,000 samples, a function showing 5% has a margin of error of roughly ±0.5%. With only 1,000 sa...
trusted_official_docs
CPython Docs
(5% of total), Tachyon estimates it consumed 5% of the 10-second duration, or about 500 milliseconds. This is a statistical estimate, not a precise measurement. The accuracy of these estimates depends on sample count. With 100,000 samples, a function showing 5% has a margin of error of roughly ±0.5%. With only 1,000 sa...
(5% of total), Tachyon estimates it consumed 5% of the 10-second duration, or about 500 milliseconds. This is a statistical estimate, not a precise measurement. The accuracy of these estimates depends on sample count. With 100,000 samples, a function showing 5% has a margin of error of roughly ±0.5%. With only 1,000 sa...
python, official-docs, cpython, P0
Local_Trusted_Corpus
5a3030af-d67f-4a3a-855d-66484b6dccbf
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,946
supabase-export-v2
d7306251c82c971b
python -m profiling.sampling run --native script.py These frames help distinguish time spent in Python code versus time spent in native libraries. Without this option, native code execution appears as time in the Python function that made the call. This is useful when optimizing code that makes heavy use of C extension...
trusted_official_docs
CPython Docs
python -m profiling.sampling run --native script.py These frames help distinguish time spent in Python code versus time spent in native libraries. Without this option, native code execution appears as time in the Python function that made the call. This is useful when optimizing code that makes heavy use of C extension...
python -m profiling.sampling run --native script.py These frames help distinguish time spent in Python code versus time spent in native libraries. Without this option, native code execution appears as time in the Python function that made the call. This is useful when optimizing code that makes heavy use of C extension...
python, official-docs, cpython, P0
Local_Trusted_Corpus
5b6dd991-9a83-4936-8fb8-31e625754b0d
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,944
supabase-export-v2
960b5a375388f40a
the interpreter is doing at the moment each sample is taken. These synthetic frames help distinguish different types of execution that would otherwise be invisible. The :option:`--native` option adds ``<native>`` frames to indicate when Python has called into C code (extension modules, built-in functions, or the interp...
trusted_official_docs
CPython Docs
the interpreter is doing at the moment each sample is taken. These synthetic frames help distinguish different types of execution that would otherwise be invisible. The :option:`--native` option adds ``<native>`` frames to indicate when Python has called into C code (extension modules, built-in functions, or the interp...
the interpreter is doing at the moment each sample is taken. These synthetic frames help distinguish different types of execution that would otherwise be invisible. The :option:`--native` option adds ``<native>`` frames to indicate when Python has called into C code (extension modules, built-in functions, or the interp...
python, official-docs, cpython, P0
Local_Trusted_Corpus
5b92945f-cb64-4b72-bcf9-893bf1ba69a5
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,872
supabase-export-v2
5064114c22ae8556
When the target's source files are readable, ``dump`` prints the source line for each frame and highlights the executing expression. Like ``attach``, ``dump`` requires permission to read the target process's memory. See :ref:`profiling-permissions`.
trusted_official_docs
CPython Docs
When the target's source files are readable, ``dump`` prints the source line for each frame and highlights the executing expression. Like ``attach``, ``dump`` requires permission to read the target process's memory. See :ref:`profiling-permissions`.
When the target's source files are readable, ``dump`` prints the source line for each frame and highlights the executing expression. Like ``attach``, ``dump`` requires permission to read the target process's memory. See :ref:`profiling-permissions`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
5ec61ab8-6af7-4aee-a1a5-77ba87fc15ff
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,037
supabase-export-v2
7492c3f2d9760e68
.. figure:: tachyon-pstats.png :alt: Tachyon pstats terminal output :align: center :width: 100% The pstats format displays profiling results in a color-coded table showing function hotspots, sample counts, and timing estimates.
trusted_official_docs
CPython Docs
.. figure:: tachyon-pstats.png :alt: Tachyon pstats terminal output :align: center :width: 100% The pstats format displays profiling results in a color-coded table showing function hotspots, sample counts, and timing estimates.
.. figure:: tachyon-pstats.png :alt: Tachyon pstats terminal output :align: center :width: 100% The pstats format displays profiling results in a color-coded table showing function hotspots, sample counts, and timing estimates.
python, official-docs, cpython, P0
Local_Trusted_Corpus
6056bf95-a2cc-4741-8852-e616707aab41
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,919
supabase-export-v2
d8900d46c977015e
.. list-table:: :header-rows: 1 :widths: 25 75 * - Option - Default * - Default for ``--sampling-rate`` / ``-r`` - 1 kHz * - Default for ``--duration`` / ``-d`` - Run to completion * - Default for ``--all-threads`` / ``-a`` - Main thread only * - Default for ``--native`` - No ``<native>`` frames (C code time a...
trusted_official_docs
CPython Docs
.. list-table:: :header-rows: 1 :widths: 25 75 * - Option - Default * - Default for ``--sampling-rate`` / ``-r`` - 1 kHz * - Default for ``--duration`` / ``-d`` - Run to completion * - Default for ``--all-threads`` / ``-a`` - Main thread only * - Default for ``--native`` - No ``<native>`` frames (C code time a...
.. list-table:: :header-rows: 1 :widths: 25 75 * - Option - Default * - Default for ``--sampling-rate`` / ``-r`` - 1 kHz * - Default for ``--duration`` / ``-d`` - Run to completion * - Default for ``--all-threads`` / ``-a`` - Main thread only * - Default for ``--native`` - No ``<native>`` frames (C code time a...
python, official-docs, cpython, P0
Local_Trusted_Corpus
608e855e-24ca-4c85-9a56-e08ebbad2e96
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,174
supabase-export-v2
aaabef159673d2d7
.. note:: Async-aware profiling requires the target process to have the :mod:`asyncio` module loaded. If you profile a script before it imports asyncio, async-aware mode will not be able to capture task information.
trusted_official_docs
CPython Docs
.. note:: Async-aware profiling requires the target process to have the :mod:`asyncio` module loaded. If you profile a script before it imports asyncio, async-aware mode will not be able to capture task information.
.. note:: Async-aware profiling requires the target process to have the :mod:`asyncio` module loaded. If you profile a script before it imports asyncio, async-aware mode will not be able to capture task information.
python, official-docs, cpython, P0
Local_Trusted_Corpus
6340e7c1-9fde-4a5a-a727-6fa26adc233c
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,894
supabase-export-v2
3ecddbe505dfd356
When profiling production systems, keep these guidelines in mind: Start with shorter durations (10-30 seconds) to get quick results, then extend if you need more statistical accuracy. By default, profiling runs until the target process completes, which is usually sufficient to identify major hotspots.
trusted_official_docs
CPython Docs
When profiling production systems, keep these guidelines in mind: Start with shorter durations (10-30 seconds) to get quick results, then extend if you need more statistical accuracy. By default, profiling runs until the target process completes, which is usually sufficient to identify major hotspots.
When profiling production systems, keep these guidelines in mind: Start with shorter durations (10-30 seconds) to get quick results, then extend if you need more statistical accuracy. By default, profiling runs until the target process completes, which is usually sufficient to identify major hotspots.
python, official-docs, cpython, P0
Local_Trusted_Corpus
64e2f354-7cb8-4f96-b320-f24c2119ce76
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,983
supabase-export-v2
a3bb464717c97738
Sampling efficiency metrics help assess the quality of the collected data. These metrics appear in the profiler's terminal output and in the flame graph sidebar. **Sampling efficiency** is the percentage of sample attempts that succeeded. Each sample attempt reads the target process's call stack from memory. An attempt...
trusted_official_docs
CPython Docs
Sampling efficiency metrics help assess the quality of the collected data. These metrics appear in the profiler's terminal output and in the flame graph sidebar. **Sampling efficiency** is the percentage of sample attempts that succeeded. Each sample attempt reads the target process's call stack from memory. An attempt...
Sampling efficiency metrics help assess the quality of the collected data. These metrics appear in the profiler's terminal output and in the flame graph sidebar. **Sampling efficiency** is the percentage of sample attempts that succeeded. Each sample attempt reads the target process's call stack from memory. An attempt...
python, official-docs, cpython, P0
Local_Trusted_Corpus
66f3c5b4-46ec-4011-8f98-4efcfe80add2
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,825
supabase-export-v2
b55f91f51c2c4e27
second, the profiler may not collect enough samples for reliable results. Use :mod:`profiling.tracing` instead, or run the script in a loop to extend profiling time. When you need exact call counts, sampling cannot provide them. Sampling estimates frequency from snapshots, so if you need to know precisely how many time...
trusted_official_docs
CPython Docs
second, the profiler may not collect enough samples for reliable results. Use :mod:`profiling.tracing` instead, or run the script in a loop to extend profiling time. When you need exact call counts, sampling cannot provide them. Sampling estimates frequency from snapshots, so if you need to know precisely how many time...
second, the profiler may not collect enough samples for reliable results. Use :mod:`profiling.tracing` instead, or run the script in a loop to extend profiling time. When you need exact call counts, sampling cannot provide them. Sampling estimates frequency from snapshots, so if you need to know precisely how many time...
python, official-docs, cpython, P0
Local_Trusted_Corpus
67fa40da-a704-460a-8788-c3ed00447f35
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,081
supabase-export-v2
a46587496c2368d1
Differential flame graphs ~~~~~~~~~~~~~~~~~~~~~~~~~ Differential flame graphs compare two profiling runs to highlight where performance changed. This helps identify regressions introduced by code changes and validate that optimizations achieved their intended effect::
trusted_official_docs
CPython Docs
Differential flame graphs ~~~~~~~~~~~~~~~~~~~~~~~~~ Differential flame graphs compare two profiling runs to highlight where performance changed. This helps identify regressions introduced by code changes and validate that optimizations achieved their intended effect::
Differential flame graphs ~~~~~~~~~~~~~~~~~~~~~~~~~ Differential flame graphs compare two profiling runs to highlight where performance changed. This helps identify regressions introduced by code changes and validate that optimizations achieved their intended effect::
python, official-docs, cpython, P0
Local_Trusted_Corpus
69a57da6-7283-4cf1-a320-393cd0ae22f7
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,061
supabase-export-v2
1e0aeee0cef3b476
main;process_data;parse_json;decode_utf8 42 main;process_data;parse_json 156 main;handle_request;send_response 89 Each line contains semicolon-separated function names representing the call stack from bottom to top, followed by a space and the sample count. This format is designed for compatibility with external flame ...
trusted_official_docs
CPython Docs
main;process_data;parse_json;decode_utf8 42 main;process_data;parse_json 156 main;handle_request;send_response 89 Each line contains semicolon-separated function names representing the call stack from bottom to top, followed by a space and the sample count. This format is designed for compatibility with external flame ...
main;process_data;parse_json;decode_utf8 42 main;process_data;parse_json 156 main;handle_request;send_response 89 Each line contains semicolon-separated function names representing the call stack from bottom to top, followed by a space and the sample count. This format is designed for compatibility with external flame ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
6b2a0408-d39d-49b0-8474-c49c8a54294b
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,914
supabase-export-v2
a339863f77620f13
pre-release Python versions: if either the profiler or target is running a pre-release (alpha, beta, or release candidate), both must run the exact same version. On free-threaded Python builds, the profiler cannot attach from a free-threaded build to a standard build, or vice versa.
trusted_official_docs
CPython Docs
pre-release Python versions: if either the profiler or target is running a pre-release (alpha, beta, or release candidate), both must run the exact same version. On free-threaded Python builds, the profiler cannot attach from a free-threaded build to a standard build, or vice versa.
pre-release Python versions: if either the profiler or target is running a pre-release (alpha, beta, or release candidate), both must run the exact same version. On free-threaded Python builds, the profiler cannot attach from a free-threaded build to a standard build, or vice versa.
python, official-docs, cpython, P0
Local_Trusted_Corpus
6e665882-43ad-4057-995b-6c6323c0656e
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,029
supabase-export-v2
d5b1182bcef8f7ce
subsequent ``finally`` block. Similarly, ``finally`` blocks that run during normal execution (when no exception was raised) are not captured because no exception state is present. This mode is useful for understanding where your program spends time handling errors. Exception handling can be a significant source of over...
trusted_official_docs
CPython Docs
subsequent ``finally`` block. Similarly, ``finally`` blocks that run during normal execution (when no exception was raised) are not captured because no exception state is present. This mode is useful for understanding where your program spends time handling errors. Exception handling can be a significant source of over...
subsequent ``finally`` block. Similarly, ``finally`` blocks that run during normal execution (when no exception was raised) are not captured because no exception state is present. This mode is useful for understanding where your program spends time handling errors. Exception handling can be a significant source of over...
python, official-docs, cpython, P0
Local_Trusted_Corpus
70cc6909-6d05-4090-8b8a-6abd22514bec
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,827
supabase-export-v2
853fd09d299aab1f
comparing two implementations where the difference might be only 1-2%, sampling noise can obscure real differences. Use :mod:`timeit` for micro-benchmarks or :mod:`profiling.tracing` for precise measurements. The key difference from :mod:`profiling.tracing` is how measurement happens. A tracing profiler instruments you...
trusted_official_docs
CPython Docs
comparing two implementations where the difference might be only 1-2%, sampling noise can obscure real differences. Use :mod:`timeit` for micro-benchmarks or :mod:`profiling.tracing` for precise measurements. The key difference from :mod:`profiling.tracing` is how measurement happens. A tracing profiler instruments you...
comparing two implementations where the difference might be only 1-2%, sampling noise can obscure real differences. Use :mod:`timeit` for micro-benchmarks or :mod:`profiling.tracing` for precise measurements. The key difference from :mod:`profiling.tracing` is how measurement happens. A tracing profiler instruments you...
python, official-docs, cpython, P0
Local_Trusted_Corpus
710a74f1-3d5f-458c-aa8d-e2c7067b60de
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,099
supabase-export-v2
5b67e2c1de48ac2d
are executing on CPU versus idle - **Code type markers**: distinguish Python code from native (C extension) code - **GC markers**: indicate garbage collection activity For this reason, the :option:`--mode` option is not available with Gecko format; all relevant data is captured automatically.
trusted_official_docs
CPython Docs
are executing on CPU versus idle - **Code type markers**: distinguish Python code from native (C extension) code - **GC markers**: indicate garbage collection activity For this reason, the :option:`--mode` option is not available with Gecko format; all relevant data is captured automatically.
are executing on CPU versus idle - **Code type markers**: distinguish Python code from native (C extension) code - **GC markers**: indicate garbage collection activity For this reason, the :option:`--mode` option is not available with Gecko format; all relevant data is captured automatically.
python, official-docs, cpython, P0
Local_Trusted_Corpus
73c85fb5-dd3f-4c9d-9da0-281bce3ccddf
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,905
supabase-export-v2
bc27ab1f47f44839
default ptrace_scope of 1 restricts ptrace to parent processes only. To allow attaching to any process owned by the same user, set it to 0:: echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
trusted_official_docs
CPython Docs
default ptrace_scope of 1 restricts ptrace to parent processes only. To allow attaching to any process owned by the same user, set it to 0:: echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
default ptrace_scope of 1 restricts ptrace to parent processes only. To allow attaching to any process owned by the same user, set it to 0:: echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
python, official-docs, cpython, P0
Local_Trusted_Corpus
75371638-f772-4ab7-8113-88288d8fdf75
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,153
supabase-export-v2
c3f686f61ea49c59
display updates. Sampling continues in the background while the display is paused, so you can freeze the view to examine results without stopping data collection. :kbd:`r` Reset all statistics and start fresh. This is disabled after profiling finishes to prevent accidental data loss.
trusted_official_docs
CPython Docs
display updates. Sampling continues in the background while the display is paused, so you can freeze the view to examine results without stopping data collection. :kbd:`r` Reset all statistics and start fresh. This is disabled after profiling finishes to prevent accidental data loss.
display updates. Sampling continues in the background while the display is paused, so you can freeze the view to examine results without stopping data collection. :kbd:`r` Reset all statistics and start fresh. This is disabled after profiling finishes to prevent accidental data loss.
python, official-docs, cpython, P0
Local_Trusted_Corpus
77ff1607-0fd5-4bc6-a6a3-afc9b24139b4
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,135
supabase-export-v2
e9e830420d1c2548
# Capture profile in production or during tests python -m profiling.sampling attach --binary -o profile.bin 12345 # Later, analyze with different formats python -m profiling.sampling replay profile.bin python -m profiling.sampling replay --flamegraph -o profile.html profile.bin python -m profiling.sampling replay --...
trusted_official_docs
CPython Docs
# Capture profile in production or during tests python -m profiling.sampling attach --binary -o profile.bin 12345 # Later, analyze with different formats python -m profiling.sampling replay profile.bin python -m profiling.sampling replay --flamegraph -o profile.html profile.bin python -m profiling.sampling replay --...
# Capture profile in production or during tests python -m profiling.sampling attach --binary -o profile.bin 12345 # Later, analyze with different formats python -m profiling.sampling replay profile.bin python -m profiling.sampling replay --flamegraph -o profile.html profile.bin python -m profiling.sampling replay --...
python, official-docs, cpython, P0
Local_Trusted_Corpus
78ff0c43-850f-405a-bd8f-fbb1cd05ec22
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,040
supabase-export-v2
07aa02b50a304646
sample% tottime (ms) cumul% cumtime (ms) filename:lineno(function) 234/892 11.7% 234.00 44.6% 892.00 server.py:145(handle_request) 156/156 7.8% 156.00 7.8% 156.00 <built-in>:0(socket.recv) 98/421 4.9% 98.00 21.1% 421.00 parser.py:67(parse_message) The columns show sampling counts and estimated times:
trusted_official_docs
CPython Docs
sample% tottime (ms) cumul% cumtime (ms) filename:lineno(function) 234/892 11.7% 234.00 44.6% 892.00 server.py:145(handle_request) 156/156 7.8% 156.00 7.8% 156.00 <built-in>:0(socket.recv) 98/421 4.9% 98.00 21.1% 421.00 parser.py:67(parse_message) The columns show sampling counts and estimated times:
sample% tottime (ms) cumul% cumtime (ms) filename:lineno(function) 234/892 11.7% 234.00 44.6% 892.00 server.py:145(handle_request) 156/156 7.8% 156.00 7.8% 156.00 <built-in>:0(socket.recv) 98/421 4.9% 98.00 21.1% 421.00 parser.py:67(parse_message) The columns show sampling counts and estimated times:
python, official-docs, cpython, P0
Local_Trusted_Corpus
79a16b27-f42e-42fc-84ea-3c53e14bffb7
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,015
supabase-export-v2
70f2093c7d8527d6
def hash_work(): # C extension - releases GIL during computation for _ in range(200): hashlib.sha256(b"data" * 250000).hexdigest() def python_work(): # Pure Python - holds GIL during computation for _ in range(3): sum(i**2 for i in range(1000000))
trusted_official_docs
CPython Docs
def hash_work(): # C extension - releases GIL during computation for _ in range(200): hashlib.sha256(b"data" * 250000).hexdigest() def python_work(): # Pure Python - holds GIL during computation for _ in range(3): sum(i**2 for i in range(1000000))
def hash_work(): # C extension - releases GIL during computation for _ in range(200): hashlib.sha256(b"data" * 250000).hexdigest() def python_work(): # Pure Python - holds GIL during computation for _ in range(3): sum(i**2 for i in range(1000000))
python, official-docs, cpython, P0
Local_Trusted_Corpus
79d19338-1265-4dff-9d14-0fd06163ec3d
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,096
supabase-export-v2
b3d5db66d964a96f
features beyond basic flame graphs, including a timeline view, call tree exploration, and marker visualization. See the `Firefox Profiler documentation <https://profiler.firefox.com/docs/#/>`__ for detailed usage instructions. To use the output, open the Firefox Profiler in your browser and load the JSON file. The prof...
trusted_official_docs
CPython Docs
features beyond basic flame graphs, including a timeline view, call tree exploration, and marker visualization. See the `Firefox Profiler documentation <https://profiler.firefox.com/docs/#/>`__ for detailed usage instructions. To use the output, open the Firefox Profiler in your browser and load the JSON file. The prof...
features beyond basic flame graphs, including a timeline view, call tree exploration, and marker visualization. See the `Firefox Profiler documentation <https://profiler.firefox.com/docs/#/>`__ for detailed usage instructions. To use the output, open the Firefox Profiler in your browser and load the JSON file. The prof...
python, official-docs, cpython, P0
Local_Trusted_Corpus
7c15bbd8-ed48-4ce1-b650-a038ba39c3bd
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,875
supabase-export-v2
3457588a63723b63
``-a``, ``--all-threads`` Dump every thread in the target process. Without this flag only the main thread is shown. ``--native`` Include synthetic ``<native>`` frames marking transitions into C extensions or other non-Python code.
trusted_official_docs
CPython Docs
``-a``, ``--all-threads`` Dump every thread in the target process. Without this flag only the main thread is shown. ``--native`` Include synthetic ``<native>`` frames marking transitions into C extensions or other non-Python code.
``-a``, ``--all-threads`` Dump every thread in the target process. Without this flag only the main thread is shown. ``--native`` Include synthetic ``<native>`` frames marking transitions into C extensions or other non-Python code.
python, official-docs, cpython, P0
Local_Trusted_Corpus
7dc36e47-3fea-4c3d-9fad-fc7796252086
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,949
supabase-export-v2
c5250b2016c04a61
python -m profiling.sampling run --no-gc script.py GC frames help identify programs where garbage collection consumes significant time, which may indicate memory allocation patterns worth optimizing. If you see substantial time in ``<GC>`` frames, consider investigating object allocation rates or using object pooling.
trusted_official_docs
CPython Docs
python -m profiling.sampling run --no-gc script.py GC frames help identify programs where garbage collection consumes significant time, which may indicate memory allocation patterns worth optimizing. If you see substantial time in ``<GC>`` frames, consider investigating object allocation rates or using object pooling.
python -m profiling.sampling run --no-gc script.py GC frames help identify programs where garbage collection consumes significant time, which may indicate memory allocation patterns worth optimizing. If you see substantial time in ``<GC>`` frames, consider investigating object allocation rates or using object pooling.
python, official-docs, cpython, P0
Local_Trusted_Corpus
7dc7f9e7-963c-4827-9470-9a307e8aa66f
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,042
supabase-export-v2
697280c6b9694b6d
functions it called. If a function shows ``10/50``, it was directly executing in 10 samples and was on the call stack in 50 samples total. - **sample%** and **cumul%**: Percentages of total samples for direct and cumulative counts respectively.
trusted_official_docs
CPython Docs
functions it called. If a function shows ``10/50``, it was directly executing in 10 samples and was on the call stack in 50 samples total. - **sample%** and **cumul%**: Percentages of total samples for direct and cumulative counts respectively.
functions it called. If a function shows ``10/50``, it was directly executing in 10 samples and was on the call stack in 50 samples total. - **sample%** and **cumul%**: Percentages of total samples for direct and cumulative counts respectively.
python, official-docs, cpython, P0
Local_Trusted_Corpus
7df3b3e6-ace9-4207-b12f-503aecc1bf1f
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,044
supabase-export-v2
7281cbb93783f012
the profiling duration. Time units are selected automatically based on the magnitude: seconds for large values, milliseconds for moderate values, or microseconds for small values. The output includes a legend explaining each column and a summary of interesting functions that highlights:
trusted_official_docs
CPython Docs
the profiling duration. Time units are selected automatically based on the magnitude: seconds for large values, milliseconds for moderate values, or microseconds for small values. The output includes a legend explaining each column and a summary of interesting functions that highlights:
the profiling duration. Time units are selected automatically based on the magnitude: seconds for large values, milliseconds for moderate values, or microseconds for small values. The output includes a legend explaining each column and a summary of interesting functions that highlights:
python, official-docs, cpython, P0
Local_Trusted_Corpus
851e20da-71ff-40f7-bb79-be7d124c4bde
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,817
supabase-export-v2
2fc62d85a5c84927
How time is estimated --------------------- The time values shown in Tachyon's output are **estimates derived from sample counts**, not direct measurements. Tachyon counts how many times each function appears in the collected samples, then multiplies by the sampling interval to estimate time.
trusted_official_docs
CPython Docs
How time is estimated --------------------- The time values shown in Tachyon's output are **estimates derived from sample counts**, not direct measurements. Tachyon counts how many times each function appears in the collected samples, then multiplies by the sampling interval to estimate time.
How time is estimated --------------------- The time values shown in Tachyon's output are **estimates derived from sample counts**, not direct measurements. Tachyon counts how many times each function appears in the collected samples, then multiplies by the sampling interval to estimate time.
python, official-docs, cpython, P0
Local_Trusted_Corpus
854c8bf9-67e5-42d1-a3a1-9c01cc3cb99c
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,179
supabase-export-v2
ea8b16286bca2e31
task currently executing on the CPU is profiled. This shows where your program is actively spending time and is the typical choice for performance analysis. With :option:`--async-mode`\ ``=all``, tasks that are suspended (awaiting I/O, locks, or other tasks) are also included. This mode is useful for understanding what...
trusted_official_docs
CPython Docs
task currently executing on the CPU is profiled. This shows where your program is actively spending time and is the typical choice for performance analysis. With :option:`--async-mode`\ ``=all``, tasks that are suspended (awaiting I/O, locks, or other tasks) are also included. This mode is useful for understanding what...
task currently executing on the CPU is profiled. This shows where your program is actively spending time and is the typical choice for performance analysis. With :option:`--async-mode`\ ``=all``, tasks that are suspended (awaiting I/O, locks, or other tasks) are also included. This mode is useful for understanding what...
python, official-docs, cpython, P0
Local_Trusted_Corpus
869a8b88-b8dd-4e09-a309-b8812a08fac1
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,927
supabase-export-v2
17e10b0523dd91d7
python -m profiling.sampling run -d 60 script.py Specifying a duration is useful when attaching to long-running processes or when you want to limit profiling to a specific time window. When profiling a script, the default behavior of running to completion is usually what you want.
trusted_official_docs
CPython Docs
python -m profiling.sampling run -d 60 script.py Specifying a duration is useful when attaching to long-running processes or when you want to limit profiling to a specific time window. When profiling a script, the default behavior of running to completion is usually what you want.
python -m profiling.sampling run -d 60 script.py Specifying a duration is useful when attaching to long-running processes or when you want to limit profiling to a specific time window. When profiling a script, the default behavior of running to completion is usually what you want.
python, official-docs, cpython, P0
Local_Trusted_Corpus
86a70c59-fd59-4a1a-9ff1-a2d010512d04
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,158
supabase-export-v2
f7495bfed18878e2
:kbd:`←` :kbd:`→` or :kbd:`↑` :kbd:`↓` In per-thread view, navigate between threads. Navigation wraps around from the last thread to the first and vice versa. :kbd:`+` / :kbd:`-` Increase or decrease the display refresh rate. The range is 0.05 seconds (20 Hz, very responsive) to 1.0 second (1 Hz, lower overhead). Fas...
trusted_official_docs
CPython Docs
:kbd:`←` :kbd:`→` or :kbd:`↑` :kbd:`↓` In per-thread view, navigate between threads. Navigation wraps around from the last thread to the first and vice versa. :kbd:`+` / :kbd:`-` Increase or decrease the display refresh rate. The range is 0.05 seconds (20 Hz, very responsive) to 1.0 second (1 Hz, lower overhead). Fas...
:kbd:`←` :kbd:`→` or :kbd:`↑` :kbd:`↓` In per-thread view, navigate between threads. Navigation wraps around from the last thread to the first and vice versa. :kbd:`+` / :kbd:`-` Increase or decrease the display refresh rate. The range is 0.05 seconds (20 Hz, very responsive) to 1.0 second (1 Hz, lower overhead). Fas...
python, official-docs, cpython, P0
Local_Trusted_Corpus
88b3dd72-5687-49b6-9837-8a4d049f1288
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,932
supabase-export-v2
38b586473ded0c56
python -m profiling.sampling run -a script.py Multi-thread profiling reveals how work is distributed across threads and can identify threads that are blocked or starved. Each thread's samples are combined in the output, with the ability to filter by thread in some formats. This option is particularly useful when invest...
trusted_official_docs
CPython Docs
python -m profiling.sampling run -a script.py Multi-thread profiling reveals how work is distributed across threads and can identify threads that are blocked or starved. Each thread's samples are combined in the output, with the ability to filter by thread in some formats. This option is particularly useful when invest...
python -m profiling.sampling run -a script.py Multi-thread profiling reveals how work is distributed across threads and can identify threads that are blocked or starved. Each thread's samples are combined in the output, with the ability to filter by thread in some formats. This option is particularly useful when invest...
python, official-docs, cpython, P0
Local_Trusted_Corpus
88b4b389-6542-4bcb-ab6e-6cc51d88e9db
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,116
supabase-export-v2
eb2152bde1a3f280
When opcode-level profiling is enabled with :option:`--opcodes`, each hot line can be expanded to show which bytecode instructions consumed time: .. figure:: tachyon-heatmap-with-opcodes.png :alt: Heatmap with expanded bytecode panel :align: center :width: 100%
trusted_official_docs
CPython Docs
When opcode-level profiling is enabled with :option:`--opcodes`, each hot line can be expanded to show which bytecode instructions consumed time: .. figure:: tachyon-heatmap-with-opcodes.png :alt: Heatmap with expanded bytecode panel :align: center :width: 100%
When opcode-level profiling is enabled with :option:`--opcodes`, each hot line can be expanded to show which bytecode instructions consumed time: .. figure:: tachyon-heatmap-with-opcodes.png :alt: Heatmap with expanded bytecode panel :align: center :width: 100%
python, official-docs, cpython, P0
Local_Trusted_Corpus
893bb82e-8185-4684-873c-b8efa9985d24
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,257
supabase-export-v2
63373ed8a669b793
.. option:: -o <path>, --output <path> Output file or directory path. Default behavior varies by format: :option:`--pstats` prints a text table to stdout, while ``-o`` writes a binary pstats file. Other formats generate a file named ``<format>_<PID>.<ext>`` (for example, ``flamegraph_12345.html``). :option:`--heatma...
trusted_official_docs
CPython Docs
.. option:: -o <path>, --output <path> Output file or directory path. Default behavior varies by format: :option:`--pstats` prints a text table to stdout, while ``-o`` writes a binary pstats file. Other formats generate a file named ``<format>_<PID>.<ext>`` (for example, ``flamegraph_12345.html``). :option:`--heatma...
.. option:: -o <path>, --output <path> Output file or directory path. Default behavior varies by format: :option:`--pstats` prints a text table to stdout, while ``-o`` writes a binary pstats file. Other formats generate a file named ``<format>_<PID>.<ext>`` (for example, ``flamegraph_12345.html``). :option:`--heatma...
python, official-docs, cpython, P0
Local_Trusted_Corpus
8e3c9e91-9a4c-48c1-a178-b8cfc056648f
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,105
supabase-export-v2
15ce4cbabdec37ba
.. figure:: tachyon-gecko-opcodes.png :alt: Firefox Profiler Marker Chart with opcodes :align: center :width: 100% The Marker Chart displays interval markers including CPU state, GIL status, and opcodes. With ``--opcodes`` enabled, bytecode instructions like ``BINARY_OP_ADD_FLOAT``, ``CALL_PY_EXACT_ARGS``, and ``CAL...
trusted_official_docs
CPython Docs
.. figure:: tachyon-gecko-opcodes.png :alt: Firefox Profiler Marker Chart with opcodes :align: center :width: 100% The Marker Chart displays interval markers including CPU state, GIL status, and opcodes. With ``--opcodes`` enabled, bytecode instructions like ``BINARY_OP_ADD_FLOAT``, ``CALL_PY_EXACT_ARGS``, and ``CAL...
.. figure:: tachyon-gecko-opcodes.png :alt: Firefox Profiler Marker Chart with opcodes :align: center :width: 100% The Marker Chart displays interval markers including CPU state, GIL status, and opcodes. With ``--opcodes`` enabled, bytecode instructions like ``BINARY_OP_ADD_FLOAT``, ``CALL_PY_EXACT_ARGS``, and ``CAL...
python, official-docs, cpython, P0
Local_Trusted_Corpus
8edb3999-8738-43aa-8b35-e12ba350712d
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,180
supabase-export-v2
0501f7b592a652a1
included. This mode is useful for understanding what your program is waiting on, but produces larger profiles since every suspended task appears in each sample. Task markers and stack reconstruction -------------------------------------
trusted_official_docs
CPython Docs
included. This mode is useful for understanding what your program is waiting on, but produces larger profiles since every suspended task appears in each sample. Task markers and stack reconstruction -------------------------------------
included. This mode is useful for understanding what your program is waiting on, but produces larger profiles since every suspended task appears in each sample. Task markers and stack reconstruction -------------------------------------
python, official-docs, cpython, P0
Local_Trusted_Corpus
918c75d9-f4f4-4caf-8485-e6389f418245
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,903
supabase-export-v2
e7ff517b9cff6d16
On Linux, the profiler uses ``ptrace`` or ``process_vm_readv`` to read the target process's memory. This typically requires one of: - Running as root - Having the ``CAP_SYS_PTRACE`` capability - Adjusting the Yama ptrace scope: ``/proc/sys/kernel/yama/ptrace_scope``
trusted_official_docs
CPython Docs
On Linux, the profiler uses ``ptrace`` or ``process_vm_readv`` to read the target process's memory. This typically requires one of: - Running as root - Having the ``CAP_SYS_PTRACE`` capability - Adjusting the Yama ptrace scope: ``/proc/sys/kernel/yama/ptrace_scope``
On Linux, the profiler uses ``ptrace`` or ``process_vm_readv`` to read the target process's memory. This typically requires one of: - Running as root - Having the ``CAP_SYS_PTRACE`` capability - Adjusting the Yama ptrace scope: ``/proc/sys/kernel/yama/ptrace_scope``
python, official-docs, cpython, P0
Local_Trusted_Corpus
91f60e1d-7134-4cb6-a139-03307500d4a0
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,157
supabase-export-v2
0ad239f97bbe0e5c
between viewing all threads combined or per-thread statistics. In per-thread mode, a thread counter (for example, ``1/4``) appears showing your position among the available threads. :kbd:`←` :kbd:`→` or :kbd:`↑` :kbd:`↓` In per-thread view, navigate between threads. Navigation wraps around from the last thread to the...
trusted_official_docs
CPython Docs
between viewing all threads combined or per-thread statistics. In per-thread mode, a thread counter (for example, ``1/4``) appears showing your position among the available threads. :kbd:`←` :kbd:`→` or :kbd:`↑` :kbd:`↓` In per-thread view, navigate between threads. Navigation wraps around from the last thread to the...
between viewing all threads combined or per-thread statistics. In per-thread mode, a thread counter (for example, ``1/4``) appears showing your position among the available threads. :kbd:`←` :kbd:`→` or :kbd:`↑` :kbd:`↓` In per-thread view, navigate between threads. Navigation wraps around from the last thread to the...
python, official-docs, cpython, P0
Local_Trusted_Corpus
9285f0d9-7b22-42a9-859e-b5a87eb28f5b
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,131
supabase-export-v2
d377da42060c3f09
capture from analysis. Rather than generating visualizations during profiling, you capture raw data to a compact binary file and convert it to different formats later. This approach has three main benefits:
trusted_official_docs
CPython Docs
capture from analysis. Rather than generating visualizations during profiling, you capture raw data to a compact binary file and convert it to different formats later. This approach has three main benefits:
capture from analysis. Rather than generating visualizations during profiling, you capture raw data to a compact binary file and convert it to different formats later. This approach has three main benefits:
python, official-docs, cpython, P0
Local_Trusted_Corpus
92d58072-e1af-4453-95e9-06a371673438
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,953
supabase-export-v2
636ffef250c2f367
python -m profiling.sampling run --opcodes --flamegraph script.py This feature provides visibility into Python's bytecode execution, including adaptive specialization optimizations. When a generic instruction like ``LOAD_ATTR`` is specialized at runtime into a more efficient variant like ``LOAD_ATTR_INSTANCE_VALUE``, t...
trusted_official_docs
CPython Docs
python -m profiling.sampling run --opcodes --flamegraph script.py This feature provides visibility into Python's bytecode execution, including adaptive specialization optimizations. When a generic instruction like ``LOAD_ATTR`` is specialized at runtime into a more efficient variant like ``LOAD_ATTR_INSTANCE_VALUE``, t...
python -m profiling.sampling run --opcodes --flamegraph script.py This feature provides visibility into Python's bytecode execution, including adaptive specialization optimizations. When a generic instruction like ``LOAD_ATTR`` is specialized at runtime into a more efficient variant like ``LOAD_ATTR_INSTANCE_VALUE``, t...
python, official-docs, cpython, P0
Local_Trusted_Corpus
95e65368-869a-4fbe-ba84-27ae3f62835c
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,938
supabase-export-v2
4c336bd93949a373
python -m profiling.sampling run --blocking script.py python -m profiling.sampling attach --blocking 12345 When blocking mode is enabled, the profiler suspends the target process, reads its stack, then resumes it. This guarantees that each captured stack represents a real, consistent snapshot of what the process was do...
trusted_official_docs
CPython Docs
python -m profiling.sampling run --blocking script.py python -m profiling.sampling attach --blocking 12345 When blocking mode is enabled, the profiler suspends the target process, reads its stack, then resumes it. This guarantees that each captured stack represents a real, consistent snapshot of what the process was do...
python -m profiling.sampling run --blocking script.py python -m profiling.sampling attach --blocking 12345 When blocking mode is enabled, the profiler suspends the target process, reads its stack, then resumes it. This guarantees that each captured stack represents a real, consistent snapshot of what the process was do...
python, official-docs, cpython, P0
Local_Trusted_Corpus
960bc5aa-fd9f-4091-adf4-377d2ecbd407
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,073
supabase-export-v2
a254649d70190676
If no output file is specified, the profiler generates a filename based on the process ID (for example, ``flamegraph.12345.html``). The generated HTML file requires no external dependencies and can be opened directly in a web browser. The visualization displays call stacks as nested rectangles, with width proportional ...
trusted_official_docs
CPython Docs
If no output file is specified, the profiler generates a filename based on the process ID (for example, ``flamegraph.12345.html``). The generated HTML file requires no external dependencies and can be opened directly in a web browser. The visualization displays call stacks as nested rectangles, with width proportional ...
If no output file is specified, the profiler generates a filename based on the process ID (for example, ``flamegraph.12345.html``). The generated HTML file requires no external dependencies and can be opened directly in a web browser. The visualization displays call stacks as nested rectangles, with width proportional ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
97e81269-28ed-445a-ba63-da317a165137
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,078
supabase-export-v2
76f828450590fa7d
the GIL - **Waiting GIL**: percentage of samples where a thread was waiting to acquire the GIL - **GC**: percentage of samples during garbage collection These statistics help identify GIL contention and understand how time is distributed between Python execution, native code, and waiting.
trusted_official_docs
CPython Docs
the GIL - **Waiting GIL**: percentage of samples where a thread was waiting to acquire the GIL - **GC**: percentage of samples during garbage collection These statistics help identify GIL contention and understand how time is distributed between Python execution, native code, and waiting.
the GIL - **Waiting GIL**: percentage of samples where a thread was waiting to acquire the GIL - **GC**: percentage of samples during garbage collection These statistics help identify GIL contention and understand how time is distributed between Python execution, native code, and waiting.
python, official-docs, cpython, P0
Local_Trusted_Corpus
9ad3f00b-c9f5-4c5d-83d0-bd8a207cd9e2
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,090
supabase-export-v2
a6e35443d9f7cc95
- **Purple**: New functions not present in the baseline. Frame colors indicate changes in **direct time** (time when the function was at the top of the stack, actively executing), not cumulative time including callees. Hovering over a frame shows comparison details including baseline time, current time, and the percent...
trusted_official_docs
CPython Docs
- **Purple**: New functions not present in the baseline. Frame colors indicate changes in **direct time** (time when the function was at the top of the stack, actively executing), not cumulative time including callees. Hovering over a frame shows comparison details including baseline time, current time, and the percent...
- **Purple**: New functions not present in the baseline. Frame colors indicate changes in **direct time** (time when the function was at the top of the stack, actively executing), not cumulative time including callees. Hovering over a frame shows comparison details including baseline time, current time, and the percent...
python, official-docs, cpython, P0
Local_Trusted_Corpus
a03aad32-3ab1-4420-bca5-8f5e08556392
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,064
supabase-export-v2
a475e0c764a0599f
python -m profiling.sampling run --collapsed script.py > stacks.txt flamegraph.pl stacks.txt > profile.svg The resulting SVG can be viewed in any web browser and provides an interactive visualization where you can click to zoom into specific call paths.
trusted_official_docs
CPython Docs
python -m profiling.sampling run --collapsed script.py > stacks.txt flamegraph.pl stacks.txt > profile.svg The resulting SVG can be viewed in any web browser and provides an interactive visualization where you can click to zoom into specific call paths.
python -m profiling.sampling run --collapsed script.py > stacks.txt flamegraph.pl stacks.txt > profile.svg The resulting SVG can be viewed in any web browser and provides an interactive visualization where you can click to zoom into specific call paths.
python, official-docs, cpython, P0
Local_Trusted_Corpus
a10810ae-6894-4004-9fac-f0840eb7501e
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,155
supabase-export-v2
748e252c365611e2
the filename and function name. Type a pattern and press Enter to apply, or Escape to cancel. Glob patterns and regular expressions are not supported. :kbd:`c` Clear the current filter and show all functions again.
trusted_official_docs
CPython Docs
the filename and function name. Type a pattern and press Enter to apply, or Escape to cancel. Glob patterns and regular expressions are not supported. :kbd:`c` Clear the current filter and show all functions again.
the filename and function name. Type a pattern and press Enter to apply, or Escape to cancel. Glob patterns and regular expressions are not supported. :kbd:`c` Clear the current filter and show all functions again.
python, official-docs, cpython, P0
Local_Trusted_Corpus
a2c0958a-4d67-4dae-a789-3a171137fd1e
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,178
supabase-export-v2
9ff33cfa3eb82442
python -m profiling.sampling run --async-aware --async-mode=running async_script.py python -m profiling.sampling run --async-aware --async-mode=all async_script.py With :option:`--async-mode`\ ``=running`` (the default), only the task currently executing on the CPU is profiled. This shows where your program is actively...
trusted_official_docs
CPython Docs
python -m profiling.sampling run --async-aware --async-mode=running async_script.py python -m profiling.sampling run --async-aware --async-mode=all async_script.py With :option:`--async-mode`\ ``=running`` (the default), only the task currently executing on the CPU is profiled. This shows where your program is actively...
python -m profiling.sampling run --async-aware --async-mode=running async_script.py python -m profiling.sampling run --async-aware --async-mode=all async_script.py With :option:`--async-mode`\ ``=running`` (the default), only the task currently executing on the CPU is profiled. This shows where your program is actively...
python, official-docs, cpython, P0
Local_Trusted_Corpus
a3846ec0-ae91-4da3-9557-dd99989e4594
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,114
supabase-export-v2
92f620d8b63791c3
The heatmap interface provides several interactive features: - **Coloring modes**: toggle between "Self Time" (direct execution) and "Total Time" (cumulative, including time in called functions) - **Cold code filtering**: show all lines or only lines with samples - **Call graph navigation**: each line shows navigation...
trusted_official_docs
CPython Docs
The heatmap interface provides several interactive features: - **Coloring modes**: toggle between "Self Time" (direct execution) and "Total Time" (cumulative, including time in called functions) - **Cold code filtering**: show all lines or only lines with samples - **Call graph navigation**: each line shows navigation...
The heatmap interface provides several interactive features: - **Coloring modes**: toggle between "Self Time" (direct execution) and "Total Time" (cumulative, including time in called functions) - **Cold code filtering**: show all lines or only lines with samples - **Call graph navigation**: each line shows navigation...
python, official-docs, cpython, P0
Local_Trusted_Corpus
a3f9b35e-ec60-4510-ab65-861b65ff1573
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,878
supabase-export-v2
95df8e9ea153aec6
frame with the bytecode opcode the thread is currently executing (for example, ``opcode=CALL_KW``). Useful for instruction-level investigation, including identifying specializations chosen by the adaptive interpreter. ``--async-aware`` Reconstruct stacks across ``await`` boundaries. ``dump`` walks the task graph and ...
trusted_official_docs
CPython Docs
frame with the bytecode opcode the thread is currently executing (for example, ``opcode=CALL_KW``). Useful for instruction-level investigation, including identifying specializations chosen by the adaptive interpreter. ``--async-aware`` Reconstruct stacks across ``await`` boundaries. ``dump`` walks the task graph and ...
frame with the bytecode opcode the thread is currently executing (for example, ``opcode=CALL_KW``). Useful for instruction-level investigation, including identifying specializations chosen by the adaptive interpreter. ``--async-aware`` Reconstruct stacks across ``await`` boundaries. ``dump`` walks the task graph and ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
a4485bef-7470-4b92-81ec-19bf645bcda9
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,917
supabase-export-v2
2f72043dfb627359
options that control how frequently samples are collected, how long profiling runs, which threads are observed, and what additional context is captured in each sample. The default configuration works well for most use cases:
trusted_official_docs
CPython Docs
options that control how frequently samples are collected, how long profiling runs, which threads are observed, and what additional context is captured in each sample. The default configuration works well for most use cases:
options that control how frequently samples are collected, how long profiling runs, which threads are observed, and what additional context is captured in each sample. The default configuration works well for most use cases:
python, official-docs, cpython, P0
Local_Trusted_Corpus
a496747b-8c49-4930-a2e4-f68fd581da9d
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,076
supabase-export-v2
0b6319abd36a5d16
and ``file.py:42`` line patterns - Per-thread filtering via dropdown - Dark/light theme toggle (preference saved across sessions) - SVG export for saving the current view The thread statistics section shows runtime behavior metrics:
trusted_official_docs
CPython Docs
and ``file.py:42`` line patterns - Per-thread filtering via dropdown - Dark/light theme toggle (preference saved across sessions) - SVG export for saving the current view The thread statistics section shows runtime behavior metrics:
and ``file.py:42`` line patterns - Per-thread filtering via dropdown - Dark/light theme toggle (preference saved across sessions) - SVG export for saving the current view The thread statistics section shows runtime behavior metrics:
python, official-docs, cpython, P0
Local_Trusted_Corpus
a4fdd1db-b275-4232-82fc-362c0a5fad64
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,868
supabase-export-v2
c8c6cae6828b91f0
loop: it reads the stack once. This is useful for investigating hung or unresponsive processes, or for answering "what is this process doing right now?". The output mirrors a traceback (most recent call last) and annotates each thread with its current state (main thread, has GIL, on CPU, waiting for GIL, has exception,...
trusted_official_docs
CPython Docs
loop: it reads the stack once. This is useful for investigating hung or unresponsive processes, or for answering "what is this process doing right now?". The output mirrors a traceback (most recent call last) and annotates each thread with its current state (main thread, has GIL, on CPU, waiting for GIL, has exception,...
loop: it reads the stack once. This is useful for investigating hung or unresponsive processes, or for answering "what is this process doing right now?". The output mirrors a traceback (most recent call last) and annotates each thread with its current state (main thread, has GIL, on CPU, waiting for GIL, has exception,...
python, official-docs, cpython, P0
Local_Trusted_Corpus
a518ac50-ecd0-4d11-a63c-8b2229b826bc
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,826
supabase-export-v2
afb48de4f86a4fe0
sampling cannot provide them. Sampling estimates frequency from snapshots, so if you need to know precisely how many times a function was called, use :mod:`profiling.tracing`. When comparing two implementations where the difference might be only 1-2%, sampling noise can obscure real differences. Use :mod:`timeit` for m...
trusted_official_docs
CPython Docs
sampling cannot provide them. Sampling estimates frequency from snapshots, so if you need to know precisely how many times a function was called, use :mod:`profiling.tracing`. When comparing two implementations where the difference might be only 1-2%, sampling noise can obscure real differences. Use :mod:`timeit` for m...
sampling cannot provide them. Sampling estimates frequency from snapshots, so if you need to know precisely how many times a function was called, use :mod:`profiling.tracing`. When comparing two implementations where the difference might be only 1-2%, sampling noise can obscure real differences. Use :mod:`timeit` for m...
python, official-docs, cpython, P0
Local_Trusted_Corpus
a67befe4-332e-44b9-b07f-5ede635d7afe
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,022
supabase-export-v2
c4a2af8f234cce3e
python -m profiling.sampling run --mode=exception script.py Samples are recorded in two situations: when an exception is being propagated up the call stack (after ``raise`` but before being caught), or when code is executing inside an ``except`` block where exception information is still present in the thread state.
trusted_official_docs
CPython Docs
python -m profiling.sampling run --mode=exception script.py Samples are recorded in two situations: when an exception is being propagated up the call stack (after ``raise`` but before being caught), or when code is executing inside an ``except`` block where exception information is still present in the thread state.
python -m profiling.sampling run --mode=exception script.py Samples are recorded in two situations: when an exception is being propagated up the call stack (after ``raise`` but before being caught), or when code is executing inside an ``except`` block where exception information is still present in the thread state.
python, official-docs, cpython, P0
Local_Trusted_Corpus
a87d5adf-0645-44a9-9c3c-567c8a14b99f
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,967
supabase-export-v2
f064f44bd69624cd
profiler instance is automatically spawned to profile it. This is useful for applications that use :mod:`multiprocessing`, :mod:`subprocess`, :mod:`concurrent.futures` with :class:`~concurrent.futures.ProcessPoolExecutor`, or other process spawning mechanisms. .. code-block:: python :caption: worker_pool.py
trusted_official_docs
CPython Docs
profiler instance is automatically spawned to profile it. This is useful for applications that use :mod:`multiprocessing`, :mod:`subprocess`, :mod:`concurrent.futures` with :class:`~concurrent.futures.ProcessPoolExecutor`, or other process spawning mechanisms. .. code-block:: python :caption: worker_pool.py
profiler instance is automatically spawned to profile it. This is useful for applications that use :mod:`multiprocessing`, :mod:`subprocess`, :mod:`concurrent.futures` with :class:`~concurrent.futures.ProcessPoolExecutor`, or other process spawning mechanisms. .. code-block:: python :caption: worker_pool.py
python, official-docs, cpython, P0
Local_Trusted_Corpus
a883a0a0-f7b9-4dca-afb5-622acfe3882b
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,822
supabase-export-v2
0023fd7773240c98
in the next. This is normal and expected. Focus on the overall pattern rather than exact percentages, and don't worry about small variations between runs. When to use a different approach --------------------------------
trusted_official_docs
CPython Docs
in the next. This is normal and expected. Focus on the overall pattern rather than exact percentages, and don't worry about small variations between runs. When to use a different approach --------------------------------
in the next. This is normal and expected. Focus on the overall pattern rather than exact percentages, and don't worry about small variations between runs. When to use a different approach --------------------------------
python, official-docs, cpython, P0
Local_Trusted_Corpus
a9f8d748-3c74-4f2c-8388-a7a00d80d889
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,859
supabase-export-v2
c3e7b3bcf0b9fe9c
python -m profiling.sampling attach 12345 This command is particularly valuable for investigating performance issues in production systems. The target process requires no modification and need not be restarted. The profiler attaches, collects samples for the specified duration, then detaches and produces output.
trusted_official_docs
CPython Docs
python -m profiling.sampling attach 12345 This command is particularly valuable for investigating performance issues in production systems. The target process requires no modification and need not be restarted. The profiler attaches, collects samples for the specified duration, then detaches and produces output.
python -m profiling.sampling attach 12345 This command is particularly valuable for investigating performance issues in production systems. The target process requires no modification and need not be restarted. The profiler attaches, collects samples for the specified duration, then detaches and produces output.
python, official-docs, cpython, P0
Local_Trusted_Corpus
aab65976-dd9a-4863-9bc2-35083fe08f22
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,943
supabase-export-v2
2f9f5d59681532f4
Special frames -------------- The profiler can inject artificial frames into the captured stacks to provide additional context about what the interpreter is doing at the moment each sample is taken. These synthetic frames help distinguish different types of execution that would otherwise be invisible.
trusted_official_docs
CPython Docs
Special frames -------------- The profiler can inject artificial frames into the captured stacks to provide additional context about what the interpreter is doing at the moment each sample is taken. These synthetic frames help distinguish different types of execution that would otherwise be invisible.
Special frames -------------- The profiler can inject artificial frames into the captured stacks to provide additional context about what the interpreter is doing at the moment each sample is taken. These synthetic frames help distinguish different types of execution that would otherwise be invisible.
python, official-docs, cpython, P0
Local_Trusted_Corpus
ab940050-5580-440d-bddb-d4870ddf8a5b
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,026
supabase-export-v2
229a2e2e455a3cd7
example(): try: raise ValueError("error") # Captured: exception being raised except ValueError: process_error() # Captured: inside except block finally: cleanup() # NOT captured: exception already handled def example_propagating(): try: try: raise ValueError("error") finally: cleanup() # Captured: exception propag...
trusted_official_docs
CPython Docs
example(): try: raise ValueError("error") # Captured: exception being raised except ValueError: process_error() # Captured: inside except block finally: cleanup() # NOT captured: exception already handled def example_propagating(): try: try: raise ValueError("error") finally: cleanup() # Captured: exception propag...
example(): try: raise ValueError("error") # Captured: exception being raised except ValueError: process_error() # Captured: inside except block finally: cleanup() # NOT captured: exception already handled def example_propagating(): try: try: raise ValueError("error") finally: cleanup() # Captured: exception propag...
python, official-docs, cpython, P0
Local_Trusted_Corpus
aedf5e9a-43fb-47b3-9d8e-835780d756a7
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,820
supabase-export-v2
1819e99fb98f1942
margin of error of roughly ±0.5%. With only 1,000 samples, the same 5% measurement could actually represent anywhere from 3% to 7% of real time. This is why longer profiling durations and shorter sampling intervals produce more reliable results---they collect more samples. For most performance analysis, the default set...
trusted_official_docs
CPython Docs
margin of error of roughly ±0.5%. With only 1,000 samples, the same 5% measurement could actually represent anywhere from 3% to 7% of real time. This is why longer profiling durations and shorter sampling intervals produce more reliable results---they collect more samples. For most performance analysis, the default set...
margin of error of roughly ±0.5%. With only 1,000 samples, the same 5% measurement could actually represent anywhere from 3% to 7% of real time. This is why longer profiling durations and shorter sampling intervals produce more reliable results---they collect more samples. For most performance analysis, the default set...
python, official-docs, cpython, P0
Local_Trusted_Corpus
afbc501a-09fd-477a-bf66-da1e685e06ab
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,957
supabase-export-v2
d9e4cfe2a8d01728
This level of detail is particularly useful for: - Understanding the performance impact of Python's adaptive specialization - Identifying hot bytecode instructions that might benefit from optimization - Analyzing the effectiveness of different code patterns at the instruction level - Debugging performance issues that o...
trusted_official_docs
CPython Docs
This level of detail is particularly useful for: - Understanding the performance impact of Python's adaptive specialization - Identifying hot bytecode instructions that might benefit from optimization - Analyzing the effectiveness of different code patterns at the instruction level - Debugging performance issues that o...
This level of detail is particularly useful for: - Understanding the performance impact of Python's adaptive specialization - Identifying hot bytecode instructions that might benefit from optimization - Analyzing the effectiveness of different code patterns at the instruction level - Debugging performance issues that o...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b002832a-eb81-479b-a20d-3bf4b66942a4
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,046
supabase-export-v2
9508ad9d4efd6be2
These functions spend most of their time executing their own code rather than waiting for callees. High ratios indicate where CPU time is actually consumed. - **Indirect calls**: Functions with large differences between cumulative and direct samples. These are orchestration functions that delegate work to other funct...
trusted_official_docs
CPython Docs
These functions spend most of their time executing their own code rather than waiting for callees. High ratios indicate where CPU time is actually consumed. - **Indirect calls**: Functions with large differences between cumulative and direct samples. These are orchestration functions that delegate work to other funct...
These functions spend most of their time executing their own code rather than waiting for callees. High ratios indicate where CPU time is actually consumed. - **Indirect calls**: Functions with large differences between cumulative and direct samples. These are orchestration functions that delegate work to other funct...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b0615a7a-5b23-4479-8702-068cfde2cfa9
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,828
supabase-export-v2
d8690d161a198cee
someone follow you and write down every step you take, while sampling is like taking photographs every second and inferring your path from those snapshots. This external observation model is what makes sampling profiling practical for production use. The profiled program runs at full speed because there is no instrumen...
trusted_official_docs
CPython Docs
someone follow you and write down every step you take, while sampling is like taking photographs every second and inferring your path from those snapshots. This external observation model is what makes sampling profiling practical for production use. The profiled program runs at full speed because there is no instrumen...
someone follow you and write down every step you take, while sampling is like taking photographs every second and inferring your path from those snapshots. This external observation model is what makes sampling profiling practical for production use. The profiled program runs at full speed because there is no instrumen...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b46ec8ed-87ac-474e-bed7-2bd585a1c144
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,867
supabase-export-v2
0dba41c1fa6b2caa
python -m profiling.sampling dump 12345 Unlike ``attach``, ``dump`` does not run a sampling loop: it reads the stack once. This is useful for investigating hung or unresponsive processes, or for answering "what is this process doing right now?".
trusted_official_docs
CPython Docs
python -m profiling.sampling dump 12345 Unlike ``attach``, ``dump`` does not run a sampling loop: it reads the stack once. This is useful for investigating hung or unresponsive processes, or for answering "what is this process doing right now?".
python -m profiling.sampling dump 12345 Unlike ``attach``, ``dump`` does not run a sampling loop: it reads the stack once. This is useful for investigating hung or unresponsive processes, or for answering "what is this process doing right now?".
python, official-docs, cpython, P0
Local_Trusted_Corpus
b4d10061-62dd-4cac-9cac-8205438d0e92
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,001
supabase-export-v2
930a72da08317d10
function appears prominently in both profiles, it is a true computational hotspot---actively using the CPU. Optimization should focus on algorithmic improvements or more efficient code. If a function is high in wall-clock mode but low or absent in CPU mode, it is I/O-bound or waiting. The function spends most of its ti...
trusted_official_docs
CPython Docs
function appears prominently in both profiles, it is a true computational hotspot---actively using the CPU. Optimization should focus on algorithmic improvements or more efficient code. If a function is high in wall-clock mode but low or absent in CPU mode, it is I/O-bound or waiting. The function spends most of its ti...
function appears prominently in both profiles, it is a true computational hotspot---actively using the CPU. Optimization should focus on algorithmic improvements or more efficient code. If a function is high in wall-clock mode but low or absent in CPU mode, it is I/O-bound or waiting. The function spends most of its ti...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b61092ab-8083-49d3-8371-3d62afa69b09
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,854
supabase-export-v2
5b4359164f23fc00
python -m profiling.sampling run script.py python -m profiling.sampling run -m mypackage.module When profiling a script, the profiler starts the target in a subprocess, waits for it to initialize, then begins collecting samples. The ``-m`` flag indicates that the target should be run as a module (equivalent to ``python...
trusted_official_docs
CPython Docs
python -m profiling.sampling run script.py python -m profiling.sampling run -m mypackage.module When profiling a script, the profiler starts the target in a subprocess, waits for it to initialize, then begins collecting samples. The ``-m`` flag indicates that the target should be run as a module (equivalent to ``python...
python -m profiling.sampling run script.py python -m profiling.sampling run -m mypackage.module When profiling a script, the profiler starts the target in a subprocess, waits for it to initialize, then begins collecting samples. The ``-m`` flag indicates that the target should be run as a module (equivalent to ``python...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b6b53d05-1ee0-48a4-91ee-90157eb35e94
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,144
supabase-export-v2
87aed1d6fba33c43
status statistics (GIL held percentage, CPU usage, GC time). The main table shows function statistics with the currently sorted column indicated by an arrow (▼). When :option:`--opcodes` is enabled, an additional opcode panel appears below the main table, showing instruction-level statistics for the currently selected ...
trusted_official_docs
CPython Docs
status statistics (GIL held percentage, CPU usage, GC time). The main table shows function statistics with the currently sorted column indicated by an arrow (▼). When :option:`--opcodes` is enabled, an additional opcode panel appears below the main table, showing instruction-level statistics for the currently selected ...
status statistics (GIL held percentage, CPU usage, GC time). The main table shows function statistics with the currently sorted column indicated by an arrow (▼). When :option:`--opcodes` is enabled, an additional opcode panel appears below the main table, showing instruction-level statistics for the currently selected ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b80dad37-c7bd-49c5-9597-4266a61528dd
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,141
supabase-export-v2
beb524f8fe528117
.. figure:: tachyon-live-mode-2.gif :alt: Tachyon live mode showing all threads :align: center :width: 100% Live mode displays real-time profiling statistics, showing combined data from multiple threads in a multi-threaded application.
trusted_official_docs
CPython Docs
.. figure:: tachyon-live-mode-2.gif :alt: Tachyon live mode showing all threads :align: center :width: 100% Live mode displays real-time profiling statistics, showing combined data from multiple threads in a multi-threaded application.
.. figure:: tachyon-live-mode-2.gif :alt: Tachyon live mode showing all threads :align: center :width: 100% Live mode displays real-time profiling statistics, showing combined data from multiple threads in a multi-threaded application.
python, official-docs, cpython, P0
Local_Trusted_Corpus
b8d7eaab-83e4-4320-ad88-4dde399b4198
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,120
supabase-export-v2
66c56b845afc5c17
`Try the interactive example <../_static/tachyon-example-heatmap.html>`__! Heatmaps are especially useful when you know which file contains a performance issue but need to identify the specific lines. Many developers prefer this format because it maps directly to their source code, making it easy to read and navigate. ...
trusted_official_docs
CPython Docs
`Try the interactive example <../_static/tachyon-example-heatmap.html>`__! Heatmaps are especially useful when you know which file contains a performance issue but need to identify the specific lines. Many developers prefer this format because it maps directly to their source code, making it easy to read and navigate. ...
`Try the interactive example <../_static/tachyon-example-heatmap.html>`__! Heatmaps are especially useful when you know which file contains a performance issue but need to identify the specific lines. Many developers prefer this format because it maps directly to their source code, making it easy to read and navigate. ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b9667281-7c43-4e89-a6fd-885a10e405cb
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,028
supabase-export-v2
05187341b46203e8
def example_no_exception(): try: do_work() finally: cleanup() # NOT captured: no exception involved Note that ``finally`` blocks are only captured when an exception is actively propagating through them. Once an ``except`` block finishes executing, Python clears the exception information before running any subsequent ``...
trusted_official_docs
CPython Docs
def example_no_exception(): try: do_work() finally: cleanup() # NOT captured: no exception involved Note that ``finally`` blocks are only captured when an exception is actively propagating through them. Once an ``except`` block finishes executing, Python clears the exception information before running any subsequent ``...
def example_no_exception(): try: do_work() finally: cleanup() # NOT captured: no exception involved Note that ``finally`` blocks are only captured when an exception is actively propagating through them. Once an ``except`` block finishes executing, Python clears the exception information before running any subsequent ``...
python, official-docs, cpython, P0
Local_Trusted_Corpus
bafd227c-26b1-42ff-a176-2e1eadb91228
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,974
supabase-export-v2
e3ff62198e413a1a
This produces separate flame graphs for the main process and each worker process: ``flamegraph_<main_pid>.html``, ``flamegraph_<worker1_pid>.html``, and so on. Each subprocess receives its own output file. The filename is derived from the specified output path (or the default) with the subprocess's process ID appended:
trusted_official_docs
CPython Docs
This produces separate flame graphs for the main process and each worker process: ``flamegraph_<main_pid>.html``, ``flamegraph_<worker1_pid>.html``, and so on. Each subprocess receives its own output file. The filename is derived from the specified output path (or the default) with the subprocess's process ID appended:
This produces separate flame graphs for the main process and each worker process: ``flamegraph_<main_pid>.html``, ``flamegraph_<worker1_pid>.html``, and so on. Each subprocess receives its own output file. The filename is derived from the specified output path (or the default) with the subprocess's process ID appended:
python, official-docs, cpython, P0
Local_Trusted_Corpus
bba23c05-b684-4767-b295-cf0b95730c2d
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,892
supabase-export-v2
39dbbe72f1ada484
Profiling in production ----------------------- The sampling profiler is designed for production use. It imposes no measurable overhead on the target process because it reads memory externally rather than instrumenting code. The target application continues running at full speed and is unaware it is being profiled.
trusted_official_docs
CPython Docs
Profiling in production ----------------------- The sampling profiler is designed for production use. It imposes no measurable overhead on the target process because it reads memory externally rather than instrumenting code. The target application continues running at full speed and is unaware it is being profiled.
Profiling in production ----------------------- The sampling profiler is designed for production use. It imposes no measurable overhead on the target process because it reads memory externally rather than instrumenting code. The target application continues running at full speed and is unaware it is being profiled.
python, official-docs, cpython, P0
Local_Trusted_Corpus
c0a3cb07-80fb-43ef-bf25-32921382e204
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,077
supabase-export-v2
6bbb66dc2b11396f
The thread statistics section shows runtime behavior metrics: - **GIL Held**: percentage of samples where a thread held the global interpreter lock (actively running Python code) - **GIL Released**: percentage of samples where no thread held the GIL - **Waiting GIL**: percentage of samples where a thread was waiting t...
trusted_official_docs
CPython Docs
The thread statistics section shows runtime behavior metrics: - **GIL Held**: percentage of samples where a thread held the global interpreter lock (actively running Python code) - **GIL Released**: percentage of samples where no thread held the GIL - **Waiting GIL**: percentage of samples where a thread was waiting t...
The thread statistics section shows runtime behavior metrics: - **GIL Held**: percentage of samples where a thread held the global interpreter lock (actively running Python code) - **GIL Released**: percentage of samples where no thread held the GIL - **Waiting GIL**: percentage of samples where a thread was waiting t...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c2428a73-2770-4ce3-9063-6f087e9cc543
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,855
supabase-export-v2
d3bc697ec762e744
indicates that the target should be run as a module (equivalent to ``python -m``). Arguments after the target are passed through to the profiled program:: python -m profiling.sampling run script.py --config settings.yaml
trusted_official_docs
CPython Docs
indicates that the target should be run as a module (equivalent to ``python -m``). Arguments after the target are passed through to the profiled program:: python -m profiling.sampling run script.py --config settings.yaml
indicates that the target should be run as a module (equivalent to ``python -m``). Arguments after the target are passed through to the profiled program:: python -m profiling.sampling run script.py --config settings.yaml
python, official-docs, cpython, P0
Local_Trusted_Corpus
c24cb771-b512-4394-8695-5b26bf68c2aa
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,108
supabase-export-v2
17f177f241e012ca
Heatmap format (:option:`--heatmap`) generates an interactive HTML visualization showing sample counts at the source line level:: python -m profiling.sampling run --heatmap script.py python -m profiling.sampling run --heatmap -o my_heatmap script.py
trusted_official_docs
CPython Docs
Heatmap format (:option:`--heatmap`) generates an interactive HTML visualization showing sample counts at the source line level:: python -m profiling.sampling run --heatmap script.py python -m profiling.sampling run --heatmap -o my_heatmap script.py
Heatmap format (:option:`--heatmap`) generates an interactive HTML visualization showing sample counts at the source line level:: python -m profiling.sampling run --heatmap script.py python -m profiling.sampling run --heatmap -o my_heatmap script.py
python, official-docs, cpython, P0
Local_Trusted_Corpus
c2f3faca-171c-4ed5-9ce3-83c4005ab59e
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,161
supabase-export-v2
2dc776dc663e27b5
:kbd:`h` or :kbd:`?` Show the help screen with all available commands. :kbd:`j` / :kbd:`k` (or :kbd:`Up` / :kbd:`Down`) Navigate through opcode entries in the opcode panel (when ``--opcodes`` is enabled). These keys scroll through the instruction-level statistics for the currently selected function.
trusted_official_docs
CPython Docs
:kbd:`h` or :kbd:`?` Show the help screen with all available commands. :kbd:`j` / :kbd:`k` (or :kbd:`Up` / :kbd:`Down`) Navigate through opcode entries in the opcode panel (when ``--opcodes`` is enabled). These keys scroll through the instruction-level statistics for the currently selected function.
:kbd:`h` or :kbd:`?` Show the help screen with all available commands. :kbd:`j` / :kbd:`k` (or :kbd:`Up` / :kbd:`Down`) Navigate through opcode entries in the opcode panel (when ``--opcodes`` is enabled). These keys scroll through the instruction-level statistics for the currently selected function.
python, official-docs, cpython, P0
Local_Trusted_Corpus
c641e4c2-7609-4670-b1a9-bae35d1d8b91
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,940
supabase-export-v2
996f7fc47973aa3f
.. warning:: Do not use very high sample rates (low ``--interval`` values) with blocking mode. Suspending and resuming a process takes time, and if the sampling interval is too short, the target will spend more time stopped than running. For blocking mode, intervals of 1000 microseconds (1 millisecond) or higher are...
trusted_official_docs
CPython Docs
.. warning:: Do not use very high sample rates (low ``--interval`` values) with blocking mode. Suspending and resuming a process takes time, and if the sampling interval is too short, the target will spend more time stopped than running. For blocking mode, intervals of 1000 microseconds (1 millisecond) or higher are...
.. warning:: Do not use very high sample rates (low ``--interval`` values) with blocking mode. Suspending and resuming a process takes time, and if the sampling interval is too short, the target will spend more time stopped than running. For blocking mode, intervals of 1000 microseconds (1 millisecond) or higher are...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c7608b47-7621-403e-bbae-6acbccf36713
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,095
supabase-export-v2
f1562d5c1ceb93aa
python -m profiling.sampling run --gecko script.py python -m profiling.sampling run --gecko -o profile.json script.py The `Firefox Profiler <https://profiler.firefox.com>`__ is a sophisticated web-based tool originally built for profiling Firefox itself. It provides features beyond basic flame graphs, including a timel...
trusted_official_docs
CPython Docs
python -m profiling.sampling run --gecko script.py python -m profiling.sampling run --gecko -o profile.json script.py The `Firefox Profiler <https://profiler.firefox.com>`__ is a sophisticated web-based tool originally built for profiling Firefox itself. It provides features beyond basic flame graphs, including a timel...
python -m profiling.sampling run --gecko script.py python -m profiling.sampling run --gecko -o profile.json script.py The `Firefox Profiler <https://profiler.firefox.com>`__ is a sophisticated web-based tool originally built for profiling Firefox itself. It provides features beyond basic flame graphs, including a timel...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c7bd3a9b-992d-4bcb-b16c-cc9f459e5ec8
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,167
supabase-export-v2
776221f7862a9ddb
python -m profiling.sampling run --async-aware async_script.py Standard profiling of async code can be confusing because the physical call stack often shows event loop internals rather than the logical flow of your coroutines. Async-aware mode addresses this by tracking which task is running and presenting stacks that ...
trusted_official_docs
CPython Docs
python -m profiling.sampling run --async-aware async_script.py Standard profiling of async code can be confusing because the physical call stack often shows event loop internals rather than the logical flow of your coroutines. Async-aware mode addresses this by tracking which task is running and presenting stacks that ...
python -m profiling.sampling run --async-aware async_script.py Standard profiling of async code can be confusing because the physical call stack often shows event loop internals rather than the logical flow of your coroutines. Async-aware mode addresses this by tracking which task is running and presenting stacks that ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
cb80b22b-fcb3-4c81-b88a-05b1c5f09629
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,045
supabase-export-v2
74ac697f6350c1f7
The output includes a legend explaining each column and a summary of interesting functions that highlights: - **Hot spots**: Functions with high direct/cumulative sample ratio (ratio close to 1.0). These functions spend most of their time executing their own code rather than waiting for callees. High ratios indicate ...
trusted_official_docs
CPython Docs
The output includes a legend explaining each column and a summary of interesting functions that highlights: - **Hot spots**: Functions with high direct/cumulative sample ratio (ratio close to 1.0). These functions spend most of their time executing their own code rather than waiting for callees. High ratios indicate ...
The output includes a legend explaining each column and a summary of interesting functions that highlights: - **Hot spots**: Functions with high direct/cumulative sample ratio (ratio close to 1.0). These functions spend most of their time executing their own code rather than waiting for callees. High ratios indicate ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
cbcd00ef-7b4f-4f28-ae66-ea81c8065718
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,152
supabase-export-v2
1e7e56b36a04edbb
:kbd:`s` / :kbd:`S` Cycle through sort orders forward/backward (sample count, percentage, total time, cumulative percentage, cumulative time). :kbd:`p` Pause or resume display updates. Sampling continues in the background while the display is paused, so you can freeze the view to examine results without stopping dat...
trusted_official_docs
CPython Docs
:kbd:`s` / :kbd:`S` Cycle through sort orders forward/backward (sample count, percentage, total time, cumulative percentage, cumulative time). :kbd:`p` Pause or resume display updates. Sampling continues in the background while the display is paused, so you can freeze the view to examine results without stopping dat...
:kbd:`s` / :kbd:`S` Cycle through sort orders forward/backward (sample count, percentage, total time, cumulative percentage, cumulative time). :kbd:`p` Pause or resume display updates. Sampling continues in the background while the display is paused, so you can freeze the view to examine results without stopping dat...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ce1d38a8-b086-4ec3-9ae7-92cd7767223a
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,147
supabase-export-v2
8e4dd462902e9fc5
.. figure:: tachyon-live-mode-1.gif :alt: Tachyon live mode with opcode panel :align: center :width: 100% Live mode with ``--opcodes`` enabled shows an opcode panel with a bytecode instruction breakdown for the selected function.
trusted_official_docs
CPython Docs
.. figure:: tachyon-live-mode-1.gif :alt: Tachyon live mode with opcode panel :align: center :width: 100% Live mode with ``--opcodes`` enabled shows an opcode panel with a bytecode instruction breakdown for the selected function.
.. figure:: tachyon-live-mode-1.gif :alt: Tachyon live mode with opcode panel :align: center :width: 100% Live mode with ``--opcodes`` enabled shows an opcode panel with a bytecode instruction breakdown for the selected function.
python, official-docs, cpython, P0
Local_Trusted_Corpus
cf55f339-0321-4357-afc1-5cc455da0459
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,112
supabase-export-v2
1d12da0bd7b660e1
file, heatmap output creates a directory containing HTML files for each profiled source file. If no output path is specified, the directory is named ``heatmap_PID``. The heatmap visualization displays your source code with a color gradient indicating how many samples were collected at each line. Hot lines (many samples...
trusted_official_docs
CPython Docs
file, heatmap output creates a directory containing HTML files for each profiled source file. If no output path is specified, the directory is named ``heatmap_PID``. The heatmap visualization displays your source code with a color gradient indicating how many samples were collected at each line. Hot lines (many samples...
file, heatmap output creates a directory containing HTML files for each profiled source file. If no output path is specified, the directory is named ``heatmap_PID``. The heatmap visualization displays your source code with a color gradient indicating how many samples were collected at each line. Hot lines (many samples...
python, official-docs, cpython, P0
Local_Trusted_Corpus
d09e2e81-6888-40ad-8dcf-d019bb2d7e05
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,808
supabase-export-v2
032c583a9590be79
code changes or restarts. Because sampling occurs externally to the target process, overhead is virtually zero, making Tachyon suitable for both development and production environments. What is statistical profiling? ==============================
trusted_official_docs
CPython Docs
code changes or restarts. Because sampling occurs externally to the target process, overhead is virtually zero, making Tachyon suitable for both development and production environments. What is statistical profiling? ==============================
code changes or restarts. Because sampling occurs externally to the target process, overhead is virtually zero, making Tachyon suitable for both development and production environments. What is statistical profiling? ==============================
python, official-docs, cpython, P0
Local_Trusted_Corpus
d0c0bc30-b77f-4451-a6da-0b4196427529
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,052
supabase-export-v2
6dfcf7867211723b
The pstats format supports several options for controlling the display. The :option:`--sort` option determines the column used for ordering results:: python -m profiling.sampling run --sort=tottime script.py python -m profiling.sampling run --sort=cumtime script.py python -m profiling.sampling run --sort=nsamples scr...
trusted_official_docs
CPython Docs
The pstats format supports several options for controlling the display. The :option:`--sort` option determines the column used for ordering results:: python -m profiling.sampling run --sort=tottime script.py python -m profiling.sampling run --sort=cumtime script.py python -m profiling.sampling run --sort=nsamples scr...
The pstats format supports several options for controlling the display. The :option:`--sort` option determines the column used for ordering results:: python -m profiling.sampling run --sort=tottime script.py python -m profiling.sampling run --sort=cumtime script.py python -m profiling.sampling run --sort=nsamples scr...
python, official-docs, cpython, P0
Local_Trusted_Corpus