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
61366da6-e2a8-4b4a-983e-e9d7b12857b4
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,784
supabase-export-v2
10c09bf33dc14985
import os import sys def main(): try: # simulate large output (your code replaces this loop) for x in range(10000): print("y") # flush output here to force SIGPIPE to be triggered # while inside this try block. sys.stdout.flush() except BrokenPipeError: # Python flushes standard streams on exit; redirect remain...
trusted_official_docs
CPython Docs
import os import sys def main(): try: # simulate large output (your code replaces this loop) for x in range(10000): print("y") # flush output here to force SIGPIPE to be triggered # while inside this try block. sys.stdout.flush() except BrokenPipeError: # Python flushes standard streams on exit; redirect remain...
import os import sys def main(): try: # simulate large output (your code replaces this loop) for x in range(10000): print("y") # flush output here to force SIGPIPE to be triggered # while inside this try block. sys.stdout.flush() except BrokenPipeError: # Python flushes standard streams on exit; redirect remain...
python, official-docs, cpython, P0
Local_Trusted_Corpus
622a21ba-07b5-4f24-9720-377b15844ed1
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,782
supabase-export-v2
da9b235df8c668f7
Note on SIGPIPE --------------- Piping output of your program to tools like :manpage:`head(1)` will cause a :const:`SIGPIPE` signal to be sent to your process when the receiver of its standard output closes early. This results in an exception like :code:`BrokenPipeError: [Errno 32] Broken pipe`. To handle this case, wr...
trusted_official_docs
CPython Docs
Note on SIGPIPE --------------- Piping output of your program to tools like :manpage:`head(1)` will cause a :const:`SIGPIPE` signal to be sent to your process when the receiver of its standard output closes early. This results in an exception like :code:`BrokenPipeError: [Errno 32] Broken pipe`. To handle this case, wr...
Note on SIGPIPE --------------- Piping output of your program to tools like :manpage:`head(1)` will cause a :const:`SIGPIPE` signal to be sent to your process when the receiver of its standard output closes early. This results in an exception like :code:`BrokenPipeError: [Errno 32] Broken pipe`. To handle this case, wr...
python, official-docs, cpython, P0
Local_Trusted_Corpus
655473a3-09fb-4949-9f84-89c202291273
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,590
supabase-export-v2
df44223c885bac59
tells the :term:`virtual machine` to execute the corresponding Python signal handler at a later point (for example, at the next :term:`bytecode` instruction). This has consequences: * It makes little sense to catch synchronous errors like :const:`SIGFPE` or :const:`SIGSEGV` that are caused by an invalid operation in C...
trusted_official_docs
CPython Docs
tells the :term:`virtual machine` to execute the corresponding Python signal handler at a later point (for example, at the next :term:`bytecode` instruction). This has consequences: * It makes little sense to catch synchronous errors like :const:`SIGFPE` or :const:`SIGSEGV` that are caused by an invalid operation in C...
tells the :term:`virtual machine` to execute the corresponding Python signal handler at a later point (for example, at the next :term:`bytecode` instruction). This has consequences: * It makes little sense to catch synchronous errors like :const:`SIGFPE` or :const:`SIGSEGV` that are caused by an invalid operation in C...
python, official-docs, cpython, P0
Local_Trusted_Corpus
69c0b027-24ce-475e-9ae3-14cb61971f7a
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,720
supabase-export-v2
8f1e7ae64bfca5ca
to the process. The signal sent is dependent on the timer being used; :const:`signal.ITIMER_REAL` will deliver :const:`SIGALRM`, :const:`signal.ITIMER_VIRTUAL` sends :const:`SIGVTALRM`, and :const:`signal.ITIMER_PROF` will deliver :const:`SIGPROF`. The old values are returned as a two-tuple of floats: (``delay``, ``in...
trusted_official_docs
CPython Docs
to the process. The signal sent is dependent on the timer being used; :const:`signal.ITIMER_REAL` will deliver :const:`SIGALRM`, :const:`signal.ITIMER_VIRTUAL` sends :const:`SIGVTALRM`, and :const:`signal.ITIMER_PROF` will deliver :const:`SIGPROF`. The old values are returned as a two-tuple of floats: (``delay``, ``in...
to the process. The signal sent is dependent on the timer being used; :const:`signal.ITIMER_REAL` will deliver :const:`SIGALRM`, :const:`signal.ITIMER_VIRTUAL` sends :const:`SIGVTALRM`, and :const:`signal.ITIMER_PROF` will deliver :const:`SIGPROF`. The old values are returned as a two-tuple of floats: (``delay``, ``in...
python, official-docs, cpython, P0
Local_Trusted_Corpus
6fc8deaf-fd11-4092-9cde-68bd9e8594a0
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,760
supabase-export-v2
c30557848e33b2f3
handler is not called for the delivered signal. The function raises an :exc:`InterruptedError` if it is interrupted by a signal that is not in *sigset*. The return value is an object representing the data contained in the ``siginfo_t`` structure, namely: ``si_signo``, ``si_code``, ``si_errno``, ``si_pid``, ``si_uid``...
trusted_official_docs
CPython Docs
handler is not called for the delivered signal. The function raises an :exc:`InterruptedError` if it is interrupted by a signal that is not in *sigset*. The return value is an object representing the data contained in the ``siginfo_t`` structure, namely: ``si_signo``, ``si_code``, ``si_errno``, ``si_pid``, ``si_uid``...
handler is not called for the delivered signal. The function raises an :exc:`InterruptedError` if it is interrupted by a signal that is not in *sigset*. The return value is an object representing the data contained in the ``siginfo_t`` structure, namely: ``si_signo``, ``si_code``, ``si_errno``, ``si_pid``, ``si_uid``...
python, official-docs, cpython, P0
Local_Trusted_Corpus
742667b3-afcb-4b47-8f6f-b5bf15b75b65
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,765
supabase-export-v2
6157e772f5b221d5
.. versionadded:: 3.3 .. versionchanged:: 3.5 The function is now retried if interrupted by a signal not in *sigset* and the signal handler does not raise an exception (see :pep:`475` for the rationale).
trusted_official_docs
CPython Docs
.. versionadded:: 3.3 .. versionchanged:: 3.5 The function is now retried if interrupted by a signal not in *sigset* and the signal handler does not raise an exception (see :pep:`475` for the rationale).
.. versionadded:: 3.3 .. versionchanged:: 3.5 The function is now retried if interrupted by a signal not in *sigset* and the signal handler does not raise an exception (see :pep:`475` for the rationale).
python, official-docs, cpython, P0
Local_Trusted_Corpus
7bf0f302-5046-4baf-a7b7-806312d200bb
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,728
supabase-export-v2
8ac97bf503c8476b
.. function:: set_wakeup_fd(fd, *, warn_on_full_buffer=True) Set the wakeup file descriptor to *fd*. When a signal your program has registered a signal handler for is received, the signal number is written as a single byte into the fd. If you haven't registered a signal handler for the signals you care about, then n...
trusted_official_docs
CPython Docs
.. function:: set_wakeup_fd(fd, *, warn_on_full_buffer=True) Set the wakeup file descriptor to *fd*. When a signal your program has registered a signal handler for is received, the signal number is written as a single byte into the fd. If you haven't registered a signal handler for the signals you care about, then n...
.. function:: set_wakeup_fd(fd, *, warn_on_full_buffer=True) Set the wakeup file descriptor to *fd*. When a signal your program has registered a signal handler for is received, the signal number is written as a single byte into the fd. If you haven't registered a signal handler for the signals you care about, then n...
python, official-docs, cpython, P0
Local_Trusted_Corpus
7da5d2fd-8ada-4d3f-975d-27851eff875b
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,596
supabase-export-v2
dc599e8f77917d47
thread. This means that signals can't be used as a means of inter-thread communication. You can use the synchronization primitives from the :mod:`threading` module instead. Besides, only the main thread of the main interpreter is allowed to set a new signal handler.
trusted_official_docs
CPython Docs
thread. This means that signals can't be used as a means of inter-thread communication. You can use the synchronization primitives from the :mod:`threading` module instead. Besides, only the main thread of the main interpreter is allowed to set a new signal handler.
thread. This means that signals can't be used as a means of inter-thread communication. You can use the synchronization primitives from the :mod:`threading` module instead. Besides, only the main thread of the main interpreter is allowed to set a new signal handler.
python, official-docs, cpython, P0
Local_Trusted_Corpus
7e91ac89-b86b-48e6-8679-ef3d32fe82c6
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,589
supabase-export-v2
2f53844b63fe71ee
Execution of Python signal handlers ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ A Python signal handler does not get executed inside the low-level (C) signal handler. Instead, the low-level signal handler sets a flag which tells the :term:`virtual machine` to execute the corresponding Python signal handler at a later point (fo...
trusted_official_docs
CPython Docs
Execution of Python signal handlers ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ A Python signal handler does not get executed inside the low-level (C) signal handler. Instead, the low-level signal handler sets a flag which tells the :term:`virtual machine` to execute the corresponding Python signal handler at a later point (fo...
Execution of Python signal handlers ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ A Python signal handler does not get executed inside the low-level (C) signal handler. Instead, the low-level signal handler sets a flag which tells the :term:`virtual machine` to execute the corresponding Python signal handler at a later point (fo...
python, official-docs, cpython, P0
Local_Trusted_Corpus
7eb2fcfb-744f-4fc2-9bc0-efe52146b989
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,710
supabase-export-v2
fa8d6963212a00e1
is permissible to attempt to unblock a signal which is not blocked. * :data:`SIG_SETMASK`: The set of blocked signals is set to the *mask* argument. *mask* is a set of signal numbers (e.g. {:const:`signal.SIGINT`, :const:`signal.SIGTERM`}). Use :func:`~signal.valid_signals` for a full mask including all signals.
trusted_official_docs
CPython Docs
is permissible to attempt to unblock a signal which is not blocked. * :data:`SIG_SETMASK`: The set of blocked signals is set to the *mask* argument. *mask* is a set of signal numbers (e.g. {:const:`signal.SIGINT`, :const:`signal.SIGTERM`}). Use :func:`~signal.valid_signals` for a full mask including all signals.
is permissible to attempt to unblock a signal which is not blocked. * :data:`SIG_SETMASK`: The set of blocked signals is set to the *mask* argument. *mask* is a set of signal numbers (e.g. {:const:`signal.SIGINT`, :const:`signal.SIGTERM`}). Use :func:`~signal.valid_signals` for a full mask including all signals.
python, official-docs, cpython, P0
Local_Trusted_Corpus
826d726f-5c9b-4d6c-9520-956f0aa865f4
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,742
supabase-export-v2
cbb152c345a934c0
.. function:: signal(signalnum, handler) Set the handler for signal *signalnum* to the function *handler*. *handler* can be a callable Python object taking two arguments (see below), or one of the special values :const:`signal.SIG_IGN` or :const:`signal.SIG_DFL`. The previous signal handler will be returned (see the...
trusted_official_docs
CPython Docs
.. function:: signal(signalnum, handler) Set the handler for signal *signalnum* to the function *handler*. *handler* can be a callable Python object taking two arguments (see below), or one of the special values :const:`signal.SIG_IGN` or :const:`signal.SIG_DFL`. The previous signal handler will be returned (see the...
.. function:: signal(signalnum, handler) Set the handler for signal *signalnum* to the function *handler*. *handler* can be a callable Python object taking two arguments (see below), or one of the special values :const:`signal.SIG_IGN` or :const:`signal.SIG_DFL`. The previous signal handler will be returned (see the...
python, official-docs, cpython, P0
Local_Trusted_Corpus
85dd1ee0-5e57-4100-8a08-b4f46f379c8c
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,701
supabase-export-v2
d768c066e3f59f8d
Use :func:`threading.get_ident` or the :attr:`~threading.Thread.ident` attribute of :class:`threading.Thread` objects to get a suitable value for *thread_id*. If *signalnum* is 0, then no signal is sent, but error checking is still performed; this can be used to check if the target thread is still running.
trusted_official_docs
CPython Docs
Use :func:`threading.get_ident` or the :attr:`~threading.Thread.ident` attribute of :class:`threading.Thread` objects to get a suitable value for *thread_id*. If *signalnum* is 0, then no signal is sent, but error checking is still performed; this can be used to check if the target thread is still running.
Use :func:`threading.get_ident` or the :attr:`~threading.Thread.ident` attribute of :class:`threading.Thread` objects to get a suitable value for *thread_id*. If *signalnum* is 0, then no signal is sent, but error checking is still performed; this can be used to check if the target thread is still running.
python, official-docs, cpython, P0
Local_Trusted_Corpus
894afa2d-9f70-4d68-b6b4-dc7c0229f708
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,744
supabase-export-v2
1342b904e04f2716
called from :ref:`the main thread of the main interpreter <signals-and-threads>`; attempting to call it from other threads will cause a :exc:`ValueError` exception to be raised. The *handler* is called with two arguments: the signal number and the current stack frame (``None`` or a frame object; for a description of f...
trusted_official_docs
CPython Docs
called from :ref:`the main thread of the main interpreter <signals-and-threads>`; attempting to call it from other threads will cause a :exc:`ValueError` exception to be raised. The *handler* is called with two arguments: the signal number and the current stack frame (``None`` or a frame object; for a description of f...
called from :ref:`the main thread of the main interpreter <signals-and-threads>`; attempting to call it from other threads will cause a :exc:`ValueError` exception to be raised. The *handler* is called with two arguments: the signal number and the current stack frame (``None`` or a frame object; for a description of f...
python, official-docs, cpython, P0
Local_Trusted_Corpus
897899cd-e058-4c8b-8258-03377031f86b
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,767
supabase-export-v2
d6e4ebd6269e4aa9
.. function:: sigtimedwait(sigset, timeout) Like :func:`sigwaitinfo`, but takes an additional *timeout* argument specifying a timeout. If *timeout* is specified as ``0``, a poll is performed. Returns :const:`None` if a timeout occurs.
trusted_official_docs
CPython Docs
.. function:: sigtimedwait(sigset, timeout) Like :func:`sigwaitinfo`, but takes an additional *timeout* argument specifying a timeout. If *timeout* is specified as ``0``, a poll is performed. Returns :const:`None` if a timeout occurs.
.. function:: sigtimedwait(sigset, timeout) Like :func:`sigwaitinfo`, but takes an additional *timeout* argument specifying a timeout. If *timeout* is specified as ``0``, a poll is performed. Returns :const:`None` if a timeout occurs.
python, official-docs, cpython, P0
Local_Trusted_Corpus
89dddb67-d914-4ba3-979e-e3cc3314c05b
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,785
supabase-export-v2
249c25845b98b4cc
# to devnull to avoid another BrokenPipeError at shutdown devnull = os.open(os.devnull, os.O_WRONLY) os.dup2(devnull, sys.stdout.fileno()) sys.exit(1) # Python exits with error code 1 on EPIPE if __name__ == '__main__': main()
trusted_official_docs
CPython Docs
# to devnull to avoid another BrokenPipeError at shutdown devnull = os.open(os.devnull, os.O_WRONLY) os.dup2(devnull, sys.stdout.fileno()) sys.exit(1) # Python exits with error code 1 on EPIPE if __name__ == '__main__': main()
# to devnull to avoid another BrokenPipeError at shutdown devnull = os.open(os.devnull, os.O_WRONLY) os.dup2(devnull, sys.stdout.fileno()) sys.exit(1) # Python exits with error code 1 on EPIPE if __name__ == '__main__': main()
python, official-docs, cpython, P0
Local_Trusted_Corpus
8cd79919-8705-4640-858c-6a1289871e0f
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,730
supabase-export-v2
acab2d1b008b84d2
If not -1, *fd* must be non-blocking. It is up to the library to remove any bytes from *fd* before calling poll or select again. When threads are enabled, this function can only be called from :ref:`the main thread of the main interpreter <signals-and-threads>`; attempting to call it from other threads will cause a :...
trusted_official_docs
CPython Docs
If not -1, *fd* must be non-blocking. It is up to the library to remove any bytes from *fd* before calling poll or select again. When threads are enabled, this function can only be called from :ref:`the main thread of the main interpreter <signals-and-threads>`; attempting to call it from other threads will cause a :...
If not -1, *fd* must be non-blocking. It is up to the library to remove any bytes from *fd* before calling poll or select again. When threads are enabled, this function can only be called from :ref:`the main thread of the main interpreter <signals-and-threads>`; attempting to call it from other threads will cause a :...
python, official-docs, cpython, P0
Local_Trusted_Corpus
9337acbd-1408-474d-919e-53076259010a
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,707
supabase-export-v2
b46b5d619d1e5645
.. function:: pthread_sigmask(how, mask) Fetch and/or change the signal mask of the calling thread. The signal mask is the set of signals whose delivery is currently blocked for the caller. Return the old signal mask as a set of signals.
trusted_official_docs
CPython Docs
.. function:: pthread_sigmask(how, mask) Fetch and/or change the signal mask of the calling thread. The signal mask is the set of signals whose delivery is currently blocked for the caller. Return the old signal mask as a set of signals.
.. function:: pthread_sigmask(how, mask) Fetch and/or change the signal mask of the calling thread. The signal mask is the set of signals whose delivery is currently blocked for the caller. Return the old signal mask as a set of signals.
python, official-docs, cpython, P0
Local_Trusted_Corpus
99b6d33b-20e5-4f59-81f9-a81fab729b37
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,600
supabase-export-v2
184c220ce3edc490
Module contents --------------- .. versionchanged:: 3.5 signal (SIG*), handler (:const:`SIG_DFL`, :const:`SIG_IGN`) and sigmask (:const:`SIG_BLOCK`, :const:`SIG_UNBLOCK`, :const:`SIG_SETMASK`) related constants listed below were turned into :class:`enums <enum.IntEnum>` (:class:`Signals`, :class:`Handlers` and :cla...
trusted_official_docs
CPython Docs
Module contents --------------- .. versionchanged:: 3.5 signal (SIG*), handler (:const:`SIG_DFL`, :const:`SIG_IGN`) and sigmask (:const:`SIG_BLOCK`, :const:`SIG_UNBLOCK`, :const:`SIG_SETMASK`) related constants listed below were turned into :class:`enums <enum.IntEnum>` (:class:`Signals`, :class:`Handlers` and :cla...
Module contents --------------- .. versionchanged:: 3.5 signal (SIG*), handler (:const:`SIG_DFL`, :const:`SIG_IGN`) and sigmask (:const:`SIG_BLOCK`, :const:`SIG_UNBLOCK`, :const:`SIG_SETMASK`) related constants listed below were turned into :class:`enums <enum.IntEnum>` (:class:`Signals`, :class:`Handlers` and :cla...
python, official-docs, cpython, P0
Local_Trusted_Corpus
9b089910-0097-484e-98c4-a7ac9eb4fea0
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,595
supabase-export-v2
d6e0e8b927e06e28
Signals and threads ^^^^^^^^^^^^^^^^^^^ Python signal handlers are always executed in the main Python thread of the main interpreter, even if the signal was received in another thread. This means that signals can't be used as a means of inter-thread communication. You can use the synchronization primitives from the :mo...
trusted_official_docs
CPython Docs
Signals and threads ^^^^^^^^^^^^^^^^^^^ Python signal handlers are always executed in the main Python thread of the main interpreter, even if the signal was received in another thread. This means that signals can't be used as a means of inter-thread communication. You can use the synchronization primitives from the :mo...
Signals and threads ^^^^^^^^^^^^^^^^^^^ Python signal handlers are always executed in the main Python thread of the main interpreter, even if the signal was received in another thread. This means that signals can't be used as a means of inter-thread communication. You can use the synchronization primitives from the :mo...
python, official-docs, cpython, P0
Local_Trusted_Corpus
9bfc46d8-cb2a-4ba7-b00d-865279f8e84e
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,737
supabase-export-v2
5a8568605dee8eb8
.. function:: siginterrupt(signalnum, flag) Change system call restart behaviour: if *flag* is :const:`False`, system calls will be restarted when interrupted by signal *signalnum*, otherwise system calls will be interrupted. Returns nothing.
trusted_official_docs
CPython Docs
.. function:: siginterrupt(signalnum, flag) Change system call restart behaviour: if *flag* is :const:`False`, system calls will be restarted when interrupted by signal *signalnum*, otherwise system calls will be interrupted. Returns nothing.
.. function:: siginterrupt(signalnum, flag) Change system call restart behaviour: if *flag* is :const:`False`, system calls will be restarted when interrupted by signal *signalnum*, otherwise system calls will be interrupted. Returns nothing.
python, official-docs, cpython, P0
Local_Trusted_Corpus
9cfeb32b-ebac-4fec-9f58-8588a8301dfb
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,601
supabase-export-v2
a7ba58de3e82f581
listed below were turned into :class:`enums <enum.IntEnum>` (:class:`Signals`, :class:`Handlers` and :class:`Sigmasks` respectively). :func:`getsignal`, :func:`pthread_sigmask`, :func:`sigpending` and :func:`sigwait` functions return human-readable :class:`enums <enum.IntEnum>` as :class:`Signals` objects. The signal m...
trusted_official_docs
CPython Docs
listed below were turned into :class:`enums <enum.IntEnum>` (:class:`Signals`, :class:`Handlers` and :class:`Sigmasks` respectively). :func:`getsignal`, :func:`pthread_sigmask`, :func:`sigpending` and :func:`sigwait` functions return human-readable :class:`enums <enum.IntEnum>` as :class:`Signals` objects. The signal m...
listed below were turned into :class:`enums <enum.IntEnum>` (:class:`Signals`, :class:`Handlers` and :class:`Sigmasks` respectively). :func:`getsignal`, :func:`pthread_sigmask`, :func:`sigpending` and :func:`sigwait` functions return human-readable :class:`enums <enum.IntEnum>` as :class:`Signals` objects. The signal m...
python, official-docs, cpython, P0
Local_Trusted_Corpus
a0e0bdee-f73b-47dd-b351-6d0c890e4c94
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,759
supabase-export-v2
368d75b0dd2d56ba
.. function:: sigwaitinfo(sigset) Suspend execution of the calling thread until the delivery of one of the signals specified in the signal set *sigset*. The function accepts the signal and removes it from the pending list of signals. If one of the signals in *sigset* is already pending for the calling thread, the fu...
trusted_official_docs
CPython Docs
.. function:: sigwaitinfo(sigset) Suspend execution of the calling thread until the delivery of one of the signals specified in the signal set *sigset*. The function accepts the signal and removes it from the pending list of signals. If one of the signals in *sigset* is already pending for the calling thread, the fu...
.. function:: sigwaitinfo(sigset) Suspend execution of the calling thread until the delivery of one of the signals specified in the signal set *sigset*. The function accepts the signal and removes it from the pending list of signals. If one of the signals in *sigset* is already pending for the calling thread, the fu...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ac2ceeba-59c8-4ed4-a7db-e9510675992b
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,700
supabase-export-v2
2907a71a135e7e6b
Therefore, the only point of sending a signal to a particular Python thread would be to force a running system call to fail with :exc:`InterruptedError`. Use :func:`threading.get_ident` or the :attr:`~threading.Thread.ident` attribute of :class:`threading.Thread` objects to get a suitable value for *thread_id*.
trusted_official_docs
CPython Docs
Therefore, the only point of sending a signal to a particular Python thread would be to force a running system call to fail with :exc:`InterruptedError`. Use :func:`threading.get_ident` or the :attr:`~threading.Thread.ident` attribute of :class:`threading.Thread` objects to get a suitable value for *thread_id*.
Therefore, the only point of sending a signal to a particular Python thread would be to force a running system call to fail with :exc:`InterruptedError`. Use :func:`threading.get_ident` or the :attr:`~threading.Thread.ident` attribute of :class:`threading.Thread` objects to get a suitable value for *thread_id*.
python, official-docs, cpython, P0
Local_Trusted_Corpus
acaa4fa0-1394-43f7-ab06-42c09c6d2294
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,592
supabase-export-v2
f86d457c5c85da2e
may run uninterrupted for an arbitrary amount of time, regardless of any signals received. The Python signal handlers will be called when the calculation finishes. * If the handler raises an exception, it will be raised "out of thin air" in the main thread. See the :ref:`note below <handlers-and-exceptions>` for a di...
trusted_official_docs
CPython Docs
may run uninterrupted for an arbitrary amount of time, regardless of any signals received. The Python signal handlers will be called when the calculation finishes. * If the handler raises an exception, it will be raised "out of thin air" in the main thread. See the :ref:`note below <handlers-and-exceptions>` for a di...
may run uninterrupted for an arbitrary amount of time, regardless of any signals received. The Python signal handlers will be called when the calculation finishes. * If the handler raises an exception, it will be raised "out of thin air" in the main thread. See the :ref:`note below <handlers-and-exceptions>` for a di...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b22971c8-f01a-488e-b1d0-6b0a3a1a96d7
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,773
supabase-export-v2
154e30b82ec3ac0d
the recomputed *timeout* if interrupted by a signal not in *sigset* and the signal handler does not raise an exception (see :pep:`475` for the rationale). .. versionchanged:: 3.15 Accepts any real number as *timeout*, not only integer or float.
trusted_official_docs
CPython Docs
the recomputed *timeout* if interrupted by a signal not in *sigset* and the signal handler does not raise an exception (see :pep:`475` for the rationale). .. versionchanged:: 3.15 Accepts any real number as *timeout*, not only integer or float.
the recomputed *timeout* if interrupted by a signal not in *sigset* and the signal handler does not raise an exception (see :pep:`475` for the rationale). .. versionchanged:: 3.15 Accepts any real number as *timeout*, not only integer or float.
python, official-docs, cpython, P0
Local_Trusted_Corpus
b79b532e-e3f4-4dcf-bf12-aed352ae35b6
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,743
supabase-export-v2
5db9c4da318143be
:const:`signal.SIG_IGN` or :const:`signal.SIG_DFL`. The previous signal handler will be returned (see the description of :func:`getsignal` above). (See the Unix man page :manpage:`signal(2)` for further information.) When threads are enabled, this function can only be called from :ref:`the main thread of the main inte...
trusted_official_docs
CPython Docs
:const:`signal.SIG_IGN` or :const:`signal.SIG_DFL`. The previous signal handler will be returned (see the description of :func:`getsignal` above). (See the Unix man page :manpage:`signal(2)` for further information.) When threads are enabled, this function can only be called from :ref:`the main thread of the main inte...
:const:`signal.SIG_IGN` or :const:`signal.SIG_DFL`. The previous signal handler will be returned (see the description of :func:`getsignal` above). (See the Unix man page :manpage:`signal(2)` for further information.) When threads are enabled, this function can only be called from :ref:`the main thread of the main inte...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b9fb9fd2-5f34-43fc-aafd-d927baa97ad7
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,733
supabase-export-v2
96e2db7329fcb67a
you use this approach, then you should set ``warn_on_full_buffer=True``, which will at least cause a warning to be printed to stderr when signals are lost. In the second approach, we use the wakeup fd *only* for wakeups, and ignore the actual byte values. In this case, all we care about is whether the fd's buffer is ...
trusted_official_docs
CPython Docs
you use this approach, then you should set ``warn_on_full_buffer=True``, which will at least cause a warning to be printed to stderr when signals are lost. In the second approach, we use the wakeup fd *only* for wakeups, and ignore the actual byte values. In this case, all we care about is whether the fd's buffer is ...
you use this approach, then you should set ``warn_on_full_buffer=True``, which will at least cause a warning to be printed to stderr when signals are lost. In the second approach, we use the wakeup fd *only* for wakeups, and ignore the actual byte values. In this case, all we care about is whether the fd's buffer is ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
bac036ef-d8d6-4d82-bc53-60ff70060c1d
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,734
supabase-export-v2
88c7b4e207db5c85
a problem at all. If you use this approach, then you should set ``warn_on_full_buffer=False``, so that your users are not confused by spurious warning messages. .. versionchanged:: 3.5 On Windows, the function now also supports socket handles.
trusted_official_docs
CPython Docs
a problem at all. If you use this approach, then you should set ``warn_on_full_buffer=False``, so that your users are not confused by spurious warning messages. .. versionchanged:: 3.5 On Windows, the function now also supports socket handles.
a problem at all. If you use this approach, then you should set ``warn_on_full_buffer=False``, so that your users are not confused by spurious warning messages. .. versionchanged:: 3.5 On Windows, the function now also supports socket handles.
python, official-docs, cpython, P0
Local_Trusted_Corpus
bc731c1f-5c12-4a7a-9b05-5e5bbaa9d3ad
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,753
supabase-export-v2
6f7292b17282204a
.. function:: sigwait(sigset) Suspend execution of the calling thread until the delivery of one of the signals specified in the signal set *sigset*. The function accepts the signal (removes it from the pending list of signals), and returns the signal number.
trusted_official_docs
CPython Docs
.. function:: sigwait(sigset) Suspend execution of the calling thread until the delivery of one of the signals specified in the signal set *sigset*. The function accepts the signal (removes it from the pending list of signals), and returns the signal number.
.. function:: sigwait(sigset) Suspend execution of the calling thread until the delivery of one of the signals specified in the signal set *sigset*. The function accepts the signal (removes it from the pending list of signals), and returns the signal number.
python, official-docs, cpython, P0
Local_Trusted_Corpus
c0264433-8417-4bb9-92f7-2786187310ad
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,731
supabase-export-v2
00efad81c3519393
called from :ref:`the main thread of the main interpreter <signals-and-threads>`; attempting to call it from other threads will cause a :exc:`ValueError` exception to be raised. There are two common ways to use this function. In both approaches, you use the fd to wake up when a signal arrives, but then they differ in...
trusted_official_docs
CPython Docs
called from :ref:`the main thread of the main interpreter <signals-and-threads>`; attempting to call it from other threads will cause a :exc:`ValueError` exception to be raised. There are two common ways to use this function. In both approaches, you use the fd to wake up when a signal arrives, but then they differ in...
called from :ref:`the main thread of the main interpreter <signals-and-threads>`; attempting to call it from other threads will cause a :exc:`ValueError` exception to be raised. There are two common ways to use this function. In both approaches, you use the fd to wake up when a signal arrives, but then they differ in...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c217a5ac-66ff-40ef-8faf-d274aade317c
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,673
supabase-export-v2
9553557a897c5978
:func:`getitimer` implementation. Expect this error if an invalid interval timer or a negative time is passed to :func:`setitimer`. This error is a subtype of :exc:`OSError`. .. versionadded:: 3.3 This error used to be a subtype of :exc:`IOError`, which is now an alias of :exc:`OSError`.
trusted_official_docs
CPython Docs
:func:`getitimer` implementation. Expect this error if an invalid interval timer or a negative time is passed to :func:`setitimer`. This error is a subtype of :exc:`OSError`. .. versionadded:: 3.3 This error used to be a subtype of :exc:`IOError`, which is now an alias of :exc:`OSError`.
:func:`getitimer` implementation. Expect this error if an invalid interval timer or a negative time is passed to :func:`setitimer`. This error is a subtype of :exc:`OSError`. .. versionadded:: 3.3 This error used to be a subtype of :exc:`IOError`, which is now an alias of :exc:`OSError`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
c5b6ae6e-2385-42bd-ac24-4f14b468b984
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,708
supabase-export-v2
68bef21d56e69f7c
signal mask is the set of signals whose delivery is currently blocked for the caller. Return the old signal mask as a set of signals. The behavior of the call is dependent on the value of *how*, as follows.
trusted_official_docs
CPython Docs
signal mask is the set of signals whose delivery is currently blocked for the caller. Return the old signal mask as a set of signals. The behavior of the call is dependent on the value of *how*, as follows.
signal mask is the set of signals whose delivery is currently blocked for the caller. Return the old signal mask as a set of signals. The behavior of the call is dependent on the value of *how*, as follows.
python, official-docs, cpython, P0
Local_Trusted_Corpus
c9dafe6e-8dee-4b74-b92e-40d850b019c6
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,685
supabase-export-v2
a57cf973d5323007
.. function:: valid_signals() Return the set of valid signal numbers on this platform. This can be less than ``range(1, NSIG)`` if some signals are reserved by the system for internal use.
trusted_official_docs
CPython Docs
.. function:: valid_signals() Return the set of valid signal numbers on this platform. This can be less than ``range(1, NSIG)`` if some signals are reserved by the system for internal use.
.. function:: valid_signals() Return the set of valid signal numbers on this platform. This can be less than ``range(1, NSIG)`` if some signals are reserved by the system for internal use.
python, official-docs, cpython, P0
Local_Trusted_Corpus
d560d727-b737-4b0b-b609-6d939345d895
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,587
supabase-export-v2
cc3130df58800e9f
reset (Python emulates the BSD style interface regardless of the underlying implementation), with the exception of the handler for :const:`SIGCHLD`, which follows the underlying implementation. On WebAssembly platforms, signals are emulated and therefore behave differently. Several functions and signals are not availab...
trusted_official_docs
CPython Docs
reset (Python emulates the BSD style interface regardless of the underlying implementation), with the exception of the handler for :const:`SIGCHLD`, which follows the underlying implementation. On WebAssembly platforms, signals are emulated and therefore behave differently. Several functions and signals are not availab...
reset (Python emulates the BSD style interface regardless of the underlying implementation), with the exception of the handler for :const:`SIGCHLD`, which follows the underlying implementation. On WebAssembly platforms, signals are emulated and therefore behave differently. Several functions and signals are not availab...
python, official-docs, cpython, P0
Local_Trusted_Corpus
daa386d5-0a6f-4e08-9826-61ab407ef41e
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,793
supabase-export-v2
cbeeeb7d7fb740ce
here, everything is fine self.lock.acquire() # If KeyboardInterrupt occurs here, __exit__ will not be called ... # KeyboardInterrupt could occur just before the function returns def __exit__(self, exc_type, exc_val, exc_tb): ... self.lock.release()
trusted_official_docs
CPython Docs
here, everything is fine self.lock.acquire() # If KeyboardInterrupt occurs here, __exit__ will not be called ... # KeyboardInterrupt could occur just before the function returns def __exit__(self, exc_type, exc_val, exc_tb): ... self.lock.release()
here, everything is fine self.lock.acquire() # If KeyboardInterrupt occurs here, __exit__ will not be called ... # KeyboardInterrupt could occur just before the function returns def __exit__(self, exc_type, exc_val, exc_tb): ... self.lock.release()
python, official-docs, cpython, P0
Local_Trusted_Corpus
e7493e2d-7c30-421d-8c65-50f65db8930d
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,680
supabase-export-v2
3f13248f31b6500c
.. function:: getsignal(signalnum) Return the current signal handler for the signal *signalnum*. The returned value may be a callable Python object, or one of the special values :const:`signal.SIG_IGN`, :const:`signal.SIG_DFL` or :const:`None`. Here, :const:`signal.SIG_IGN` means that the signal was previously ignor...
trusted_official_docs
CPython Docs
.. function:: getsignal(signalnum) Return the current signal handler for the signal *signalnum*. The returned value may be a callable Python object, or one of the special values :const:`signal.SIG_IGN`, :const:`signal.SIG_DFL` or :const:`None`. Here, :const:`signal.SIG_IGN` means that the signal was previously ignor...
.. function:: getsignal(signalnum) Return the current signal handler for the signal *signalnum*. The returned value may be a callable Python object, or one of the special values :const:`signal.SIG_IGN`, :const:`signal.SIG_DFL` or :const:`None`. Here, :const:`signal.SIG_IGN` means that the signal was previously ignor...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ef4901ac-3835-41f6-a47e-b1c6bf552b7e
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,732
supabase-export-v2
57552d46fab2d975
you use the fd to wake up when a signal arrives, but then they differ in how they determine *which* signal or signals have arrived. In the first approach, we read the data out of the fd's buffer, and the byte values give you the signal numbers. This is simple, but in rare cases it can run into a problem: generally th...
trusted_official_docs
CPython Docs
you use the fd to wake up when a signal arrives, but then they differ in how they determine *which* signal or signals have arrived. In the first approach, we read the data out of the fd's buffer, and the byte values give you the signal numbers. This is simple, but in rare cases it can run into a problem: generally th...
you use the fd to wake up when a signal arrives, but then they differ in how they determine *which* signal or signals have arrived. In the first approach, we read the data out of the fd's buffer, and the byte values give you the signal numbers. This is simple, but in rare cases it can run into a problem: generally th...
python, official-docs, cpython, P0
Local_Trusted_Corpus
f024bd3c-2911-45ed-bd64-5312c8eadb8b
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,775
supabase-export-v2
5a7a3dbe6060e490
Examples -------- Here is a minimal example program. It uses the :func:`alarm` function to limit the time spent waiting to open a file; this is useful if the file is for a serial device that may not be turned on, which would normally cause the :func:`os.open` to hang indefinitely. The solution is to set a 5-second alar...
trusted_official_docs
CPython Docs
Examples -------- Here is a minimal example program. It uses the :func:`alarm` function to limit the time spent waiting to open a file; this is useful if the file is for a serial device that may not be turned on, which would normally cause the :func:`os.open` to hang indefinitely. The solution is to set a 5-second alar...
Examples -------- Here is a minimal example program. It uses the :func:`alarm` function to limit the time spent waiting to open a file; this is useful if the file is for a serial device that may not be turned on, which would normally cause the :func:`os.open` to hang indefinitely. The solution is to set a 5-second alar...
python, official-docs, cpython, P0
Local_Trusted_Corpus
f7ced43a-96ad-4b2a-a155-08e725dbaf64
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,586
supabase-export-v2
ef0c8013a923bc8a
and sockets can be reported as ordinary Python exceptions) and :const:`SIGINT` is translated into a :exc:`KeyboardInterrupt` exception if the parent process has not changed it. A handler for a particular signal, once set, remains installed until it is explicitly reset (Python emulates the BSD style interface regardless...
trusted_official_docs
CPython Docs
and sockets can be reported as ordinary Python exceptions) and :const:`SIGINT` is translated into a :exc:`KeyboardInterrupt` exception if the parent process has not changed it. A handler for a particular signal, once set, remains installed until it is explicitly reset (Python emulates the BSD style interface regardless...
and sockets can be reported as ordinary Python exceptions) and :const:`SIGINT` is translated into a :exc:`KeyboardInterrupt` exception if the parent process has not changed it. A handler for a particular signal, once set, remains installed until it is explicitly reset (Python emulates the BSD style interface regardless...
python, official-docs, cpython, P0
Local_Trusted_Corpus
f8d96e50-cc1f-4148-8737-d43592db7996
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,786
supabase-export-v2
6916341569f13048
if __name__ == '__main__': main() Do not set :const:`SIGPIPE`'s disposition to :const:`SIG_DFL` in order to avoid :exc:`BrokenPipeError`. Doing that would cause your program to exit unexpectedly whenever any socket connection is interrupted while your program is still writing to it.
trusted_official_docs
CPython Docs
if __name__ == '__main__': main() Do not set :const:`SIGPIPE`'s disposition to :const:`SIG_DFL` in order to avoid :exc:`BrokenPipeError`. Doing that would cause your program to exit unexpectedly whenever any socket connection is interrupted while your program is still writing to it.
if __name__ == '__main__': main() Do not set :const:`SIGPIPE`'s disposition to :const:`SIG_DFL` in order to avoid :exc:`BrokenPipeError`. Doing that would cause your program to exit unexpectedly whenever any socket connection is interrupted while your program is still writing to it.
python, official-docs, cpython, P0
Local_Trusted_Corpus
fcf19780-039c-48eb-9adf-1a166cb931de
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,695
supabase-export-v2
773af78e4c33cfe8
.. function:: pidfd_send_signal(pidfd, sig, siginfo=None, flags=0) Send signal *sig* to the process referred to by file descriptor *pidfd*. Python does not currently support the *siginfo* parameter; it must be ``None``. The *flags* argument is provided for future extensions; no flag values are currently defined.
trusted_official_docs
CPython Docs
.. function:: pidfd_send_signal(pidfd, sig, siginfo=None, flags=0) Send signal *sig* to the process referred to by file descriptor *pidfd*. Python does not currently support the *siginfo* parameter; it must be ``None``. The *flags* argument is provided for future extensions; no flag values are currently defined.
.. function:: pidfd_send_signal(pidfd, sig, siginfo=None, flags=0) Send signal *sig* to the process referred to by file descriptor *pidfd*. Python does not currently support the *siginfo* parameter; it must be ``None``. The *flags* argument is provided for future extensions; no flag values are currently defined.
python, official-docs, cpython, P0
Local_Trusted_Corpus
fd88cb7e-ae23-4629-a6bf-86fe4b48b7ec
CPython Docs
file://datasets/cpython/Doc/library/signal.rst
unknown
76e86209-9fc7-44ea-bddb-7e0f74b256e6
35,740
supabase-export-v2
a43c0ac75d51be47
See the man page :manpage:`siginterrupt(3)` for further information. Note that installing a signal handler with :func:`signal` will reset the restart behaviour to interruptible by implicitly calling :c:func:`!siginterrupt` with a true *flag* value for the given signal.
trusted_official_docs
CPython Docs
See the man page :manpage:`siginterrupt(3)` for further information. Note that installing a signal handler with :func:`signal` will reset the restart behaviour to interruptible by implicitly calling :c:func:`!siginterrupt` with a true *flag* value for the given signal.
See the man page :manpage:`siginterrupt(3)` for further information. Note that installing a signal handler with :func:`signal` will reset the restart behaviour to interruptible by implicitly calling :c:func:`!siginterrupt` with a true *flag* value for the given signal.
python, official-docs, cpython, P0
Local_Trusted_Corpus
00c1f3ce-ecde-415a-9d64-a1de4b928ee9
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,047
supabase-export-v2
e66aa8aea47003fa
cumulative and direct samples. These are orchestration functions that delegate work to other functions. They appear frequently on the stack but rarely at the top. - **Call magnification**: Functions where cumulative samples far exceed direct samples (high cumulative/direct multiplier). These are frequently-nested fun...
trusted_official_docs
CPython Docs
cumulative and direct samples. These are orchestration functions that delegate work to other functions. They appear frequently on the stack but rarely at the top. - **Call magnification**: Functions where cumulative samples far exceed direct samples (high cumulative/direct multiplier). These are frequently-nested fun...
cumulative and direct samples. These are orchestration functions that delegate work to other functions. They appear frequently on the stack but rarely at the top. - **Call magnification**: Functions where cumulative samples far exceed direct samples (high cumulative/direct multiplier). These are frequently-nested fun...
python, official-docs, cpython, P0
Local_Trusted_Corpus
010e793b-1261-4d6e-90c2-5ac89ee20b2c
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,879
supabase-export-v2
834d7be46bd65294
``--async-aware`` Reconstruct stacks across ``await`` boundaries. ``dump`` walks the task graph and emits one section per task, with ``<task>`` markers separating coroutines awaiting each other. ``--async-mode {running,all}`` Controls which tasks are included when ``--async-aware`` is enabled. ``running`` shows only t...
trusted_official_docs
CPython Docs
``--async-aware`` Reconstruct stacks across ``await`` boundaries. ``dump`` walks the task graph and emits one section per task, with ``<task>`` markers separating coroutines awaiting each other. ``--async-mode {running,all}`` Controls which tasks are included when ``--async-aware`` is enabled. ``running`` shows only t...
``--async-aware`` Reconstruct stacks across ``await`` boundaries. ``dump`` walks the task graph and emits one section per task, with ``<task>`` markers separating coroutines awaiting each other. ``--async-mode {running,all}`` Controls which tasks are included when ``--async-aware`` is enabled. ``running`` shows only t...
python, official-docs, cpython, P0
Local_Trusted_Corpus
03858a86-e614-4d55-980e-43a312f633e5
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,048
supabase-export-v2
981bc6ba310178a4
- **Call magnification**: Functions where cumulative samples far exceed direct samples (high cumulative/direct multiplier). These are frequently-nested functions that appear deep in many call chains. Use :option:`--no-summary` to suppress both the legend and summary sections.
trusted_official_docs
CPython Docs
- **Call magnification**: Functions where cumulative samples far exceed direct samples (high cumulative/direct multiplier). These are frequently-nested functions that appear deep in many call chains. Use :option:`--no-summary` to suppress both the legend and summary sections.
- **Call magnification**: Functions where cumulative samples far exceed direct samples (high cumulative/direct multiplier). These are frequently-nested functions that appear deep in many call chains. Use :option:`--no-summary` to suppress both the legend and summary sections.
python, official-docs, cpython, P0
Local_Trusted_Corpus
050295b0-c61a-409e-b5a1-4053ed6cb20c
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,896
supabase-export-v2
1f44cb73d0c450f9
If possible, profile during representative load rather than peak traffic. Profiles collected during normal operation are easier to interpret than those collected during unusual spikes. The profiler itself consumes some CPU on the machine where it runs (not on the target process). On the same machine, this is typically ...
trusted_official_docs
CPython Docs
If possible, profile during representative load rather than peak traffic. Profiles collected during normal operation are easier to interpret than those collected during unusual spikes. The profiler itself consumes some CPU on the machine where it runs (not on the target process). On the same machine, this is typically ...
If possible, profile during representative load rather than peak traffic. Profiles collected during normal operation are easier to interpret than those collected during unusual spikes. The profiler itself consumes some CPU on the machine where it runs (not on the target process). On the same machine, this is typically ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
05725a78-6f44-48fe-80f4-fda798f1ba60
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,062
supabase-export-v2
03aa450aede35a7a
top, followed by a space and the sample count. This format is designed for compatibility with external flame graph tools, particularly Brendan Gregg's ``flamegraph.pl`` script. To generate a flame graph from collapsed stacks::
trusted_official_docs
CPython Docs
top, followed by a space and the sample count. This format is designed for compatibility with external flame graph tools, particularly Brendan Gregg's ``flamegraph.pl`` script. To generate a flame graph from collapsed stacks::
top, followed by a space and the sample count. This format is designed for compatibility with external flame graph tools, particularly Brendan Gregg's ``flamegraph.pl`` script. To generate a flame graph from collapsed stacks::
python, official-docs, cpython, P0
Local_Trusted_Corpus
05874865-ddf2-4f57-b316-3bc8e19ff6b0
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,813
supabase-export-v2
8ea2e276ab750c2b
execute, and observe how the profiler periodically captures snapshots of the call stack. Adjust the **sample interval** to see how sampling frequency affects the results. .. raw:: html :file: profiling-sampling-visualization.html
trusted_official_docs
CPython Docs
execute, and observe how the profiler periodically captures snapshots of the call stack. Adjust the **sample interval** to see how sampling frequency affects the results. .. raw:: html :file: profiling-sampling-visualization.html
execute, and observe how the profiler periodically captures snapshots of the call stack. Adjust the **sample interval** to see how sampling frequency affects the results. .. raw:: html :file: profiling-sampling-visualization.html
python, official-docs, cpython, P0
Local_Trusted_Corpus
063dd61e-e4c4-480b-8f41-c9e841944edb
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,809
supabase-export-v2
18dd6be55875605d
What is statistical profiling? ============================== Statistical profiling builds a picture of program behavior by periodically capturing snapshots of the call stack. Rather than instrumenting every function call and return as deterministic profilers do, Tachyon reads the call stack at regular intervals to rec...
trusted_official_docs
CPython Docs
What is statistical profiling? ============================== Statistical profiling builds a picture of program behavior by periodically capturing snapshots of the call stack. Rather than instrumenting every function call and return as deterministic profilers do, Tachyon reads the call stack at regular intervals to rec...
What is statistical profiling? ============================== Statistical profiling builds a picture of program behavior by periodically capturing snapshots of the call stack. Rather than instrumenting every function call and return as deterministic profilers do, Tachyon reads the call stack at regular intervals to rec...
python, official-docs, cpython, P0
Local_Trusted_Corpus
0730633d-8445-48cb-867b-4bd65ff0d12c
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,958
supabase-export-v2
b30b722236e696dc
benefit from optimization - Analyzing the effectiveness of different code patterns at the instruction level - Debugging performance issues that occur at the bytecode level The :option:`--opcodes` option is compatible with :option:`--live`, :option:`--flamegraph`, :option:`--heatmap`, and :option:`--gecko` formats. It r...
trusted_official_docs
CPython Docs
benefit from optimization - Analyzing the effectiveness of different code patterns at the instruction level - Debugging performance issues that occur at the bytecode level The :option:`--opcodes` option is compatible with :option:`--live`, :option:`--flamegraph`, :option:`--heatmap`, and :option:`--gecko` formats. It r...
benefit from optimization - Analyzing the effectiveness of different code patterns at the instruction level - Debugging performance issues that occur at the bytecode level The :option:`--opcodes` option is compatible with :option:`--live`, :option:`--flamegraph`, :option:`--heatmap`, and :option:`--gecko` formats. It r...
python, official-docs, cpython, P0
Local_Trusted_Corpus
0b6a2330-d54a-475e-bfbe-e020554299a8
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,916
supabase-export-v2
46f522295776493f
Sampling configuration ====================== Before exploring the various output formats and visualization options, it is important to understand how to configure the sampling process itself. The profiler offers several options that control how frequently samples are collected, how long profiling runs, which threads a...
trusted_official_docs
CPython Docs
Sampling configuration ====================== Before exploring the various output formats and visualization options, it is important to understand how to configure the sampling process itself. The profiler offers several options that control how frequently samples are collected, how long profiling runs, which threads a...
Sampling configuration ====================== Before exploring the various output formats and visualization options, it is important to understand how to configure the sampling process itself. The profiler offers several options that control how frequently samples are collected, how long profiling runs, which threads a...
python, official-docs, cpython, P0
Local_Trusted_Corpus
0b950d68-5697-497f-8b07-4f141d55c89f
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,890
supabase-export-v2
58e282da882ee704
# Convert binary to gecko format for Firefox Profiler python -m profiling.sampling replay --gecko -o profile.json profile.bin # Convert binary to heatmap python -m profiling.sampling replay --heatmap -o my_heatmap profile.bin
trusted_official_docs
CPython Docs
# Convert binary to gecko format for Firefox Profiler python -m profiling.sampling replay --gecko -o profile.json profile.bin # Convert binary to heatmap python -m profiling.sampling replay --heatmap -o my_heatmap profile.bin
# Convert binary to gecko format for Firefox Profiler python -m profiling.sampling replay --gecko -o profile.json profile.bin # Convert binary to heatmap python -m profiling.sampling replay --heatmap -o my_heatmap profile.bin
python, official-docs, cpython, P0
Local_Trusted_Corpus
0e7200fd-9691-4a50-9d1b-10ab58322f6a
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,947
supabase-export-v2
a836c7b2c8687434
the Python function that made the call. This is useful when optimizing code that makes heavy use of C extensions like NumPy or database drivers. By default, the profiler includes ``<GC>`` frames when garbage collection is active. The :option:`--no-gc` option suppresses these frames::
trusted_official_docs
CPython Docs
the Python function that made the call. This is useful when optimizing code that makes heavy use of C extensions like NumPy or database drivers. By default, the profiler includes ``<GC>`` frames when garbage collection is active. The :option:`--no-gc` option suppresses these frames::
the Python function that made the call. This is useful when optimizing code that makes heavy use of C extensions like NumPy or database drivers. By default, the profiler includes ``<GC>`` frames when garbage collection is active. The :option:`--no-gc` option suppresses these frames::
python, official-docs, cpython, P0
Local_Trusted_Corpus
11cb8497-9059-4765-9068-956286f5f033
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,075
supabase-export-v2
434f50b1d0ccfcff
The flame graph interface includes: - A sidebar showing profile summary, thread statistics, sampling efficiency metrics (see :ref:`sampling-efficiency`), and top hotspot functions - Search functionality supporting both function name matching and ``file.py:42`` line patterns - Per-thread filtering via dropdown - Dark/...
trusted_official_docs
CPython Docs
The flame graph interface includes: - A sidebar showing profile summary, thread statistics, sampling efficiency metrics (see :ref:`sampling-efficiency`), and top hotspot functions - Search functionality supporting both function name matching and ``file.py:42`` line patterns - Per-thread filtering via dropdown - Dark/...
The flame graph interface includes: - A sidebar showing profile summary, thread statistics, sampling efficiency metrics (see :ref:`sampling-efficiency`), and top hotspot functions - Search functionality supporting both function name matching and ``file.py:42`` line patterns - Per-thread filtering via dropdown - Dark/...
python, official-docs, cpython, P0
Local_Trusted_Corpus
129a8611-1638-4ed0-84e8-0ac5b52f9f84
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,011
supabase-export-v2
248bdc476c91ec31
native code, the GIL is typically released. This means GIL mode effectively measures time spent running Python code specifically, filtering out time in native libraries. In multi-threaded programs, GIL mode reveals which code is preventing other threads from running Python bytecode. Since only one thread can hold the G...
trusted_official_docs
CPython Docs
native code, the GIL is typically released. This means GIL mode effectively measures time spent running Python code specifically, filtering out time in native libraries. In multi-threaded programs, GIL mode reveals which code is preventing other threads from running Python bytecode. Since only one thread can hold the G...
native code, the GIL is typically released. This means GIL mode effectively measures time spent running Python code specifically, filtering out time in native libraries. In multi-threaded programs, GIL mode reveals which code is preventing other threads from running Python bytecode. Since only one thread can hold the G...
python, official-docs, cpython, P0
Local_Trusted_Corpus
12c84724-d962-4bd1-9dd8-bccf986d40f4
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,926
supabase-export-v2
aad9e22d4b58240d
The :option:`--duration` option (:option:`-d`) sets how long to profile in seconds. By default, profiling continues until the target process exits or is interrupted:: python -m profiling.sampling run -d 60 script.py
trusted_official_docs
CPython Docs
The :option:`--duration` option (:option:`-d`) sets how long to profile in seconds. By default, profiling continues until the target process exits or is interrupted:: python -m profiling.sampling run -d 60 script.py
The :option:`--duration` option (:option:`-d`) sets how long to profile in seconds. By default, profiling continues until the target process exits or is interrupted:: python -m profiling.sampling run -d 60 script.py
python, official-docs, cpython, P0
Local_Trusted_Corpus
13665ab5-ba24-416a-a442-81ef7e144f2b
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,893
supabase-export-v2
08fab7ec37927351
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. When profiling production systems, keep these guidelines in mind:
trusted_official_docs
CPython Docs
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. When profiling production systems, keep these guidelines in mind:
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. When profiling production systems, keep these guidelines in mind:
python, official-docs, cpython, P0
Local_Trusted_Corpus
1394f43b-9288-481e-b221-eb6378bee722
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,156
supabase-export-v2
6a88d25bca97c5f6
:kbd:`c` Clear the current filter and show all functions again. :kbd:`t` Toggle 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.
trusted_official_docs
CPython Docs
:kbd:`c` Clear the current filter and show all functions again. :kbd:`t` Toggle 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:`c` Clear the current filter and show all functions again. :kbd:`t` Toggle 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.
python, official-docs, cpython, P0
Local_Trusted_Corpus
1487117c-94c2-4dce-8ed4-b893789b22b5
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,897
supabase-export-v2
aa5a2cb5ffd19338
runs (not on the target process). On the same machine, this is typically negligible. When profiling remote processes, network latency does not affect the target. Results from production may differ from development due to different data sizes, concurrent load, or caching effects. This is expected and is often exactly wh...
trusted_official_docs
CPython Docs
runs (not on the target process). On the same machine, this is typically negligible. When profiling remote processes, network latency does not affect the target. Results from production may differ from development due to different data sizes, concurrent load, or caching effects. This is expected and is often exactly wh...
runs (not on the target process). On the same machine, this is typically negligible. When profiling remote processes, network latency does not affect the target. Results from production may differ from development due to different data sizes, concurrent load, or caching effects. This is expected and is often exactly wh...
python, official-docs, cpython, P0
Local_Trusted_Corpus
15d0112b-83c1-4bd5-9a7b-14a4fde41745
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,166
supabase-export-v2
24a68e115906acf7
For programs using :mod:`asyncio`, the profiler offers async-aware mode (:option:`--async-aware`) that reconstructs call stacks based on the task structure rather than the raw Python frames:: python -m profiling.sampling run --async-aware async_script.py
trusted_official_docs
CPython Docs
For programs using :mod:`asyncio`, the profiler offers async-aware mode (:option:`--async-aware`) that reconstructs call stacks based on the task structure rather than the raw Python frames:: python -m profiling.sampling run --async-aware async_script.py
For programs using :mod:`asyncio`, the profiler offers async-aware mode (:option:`--async-aware`) that reconstructs call stacks based on the task structure rather than the raw Python frames:: python -m profiling.sampling run --async-aware async_script.py
python, official-docs, cpython, P0
Local_Trusted_Corpus
160e6a0d-d11e-49b0-80d2-6e08b00ff13c
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,941
supabase-export-v2
e09434a7848637dd
blocking mode, intervals of 1000 microseconds (1 millisecond) or higher are recommended. The default 100 microsecond interval may cause noticeable slowdown in the target application. Use blocking mode only when you observe inconsistent stacks in your profiles, particularly with generator-heavy or coroutine-heavy code. ...
trusted_official_docs
CPython Docs
blocking mode, intervals of 1000 microseconds (1 millisecond) or higher are recommended. The default 100 microsecond interval may cause noticeable slowdown in the target application. Use blocking mode only when you observe inconsistent stacks in your profiles, particularly with generator-heavy or coroutine-heavy code. ...
blocking mode, intervals of 1000 microseconds (1 millisecond) or higher are recommended. The default 100 microsecond interval may cause noticeable slowdown in the target application. Use blocking mode only when you observe inconsistent stacks in your profiles, particularly with generator-heavy or coroutine-heavy code. ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
169e980f-876d-4a2c-b6c8-51ba1f88340c
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,913
supabase-export-v2
c6c7962ed4062396
process must run the same Python minor version (for example, both Python 3.15). Attaching from Python 3.14 to a Python 3.15 process is not supported. Additional restrictions apply to pre-release Python versions: if either the profiler or target is running a pre-release (alpha, beta, or release candidate), both must run...
trusted_official_docs
CPython Docs
process must run the same Python minor version (for example, both Python 3.15). Attaching from Python 3.14 to a Python 3.15 process is not supported. Additional restrictions apply to pre-release Python versions: if either the profiler or target is running a pre-release (alpha, beta, or release candidate), both must run...
process must run the same Python minor version (for example, both Python 3.15). Attaching from Python 3.14 to a Python 3.15 process is not supported. Additional restrictions apply to pre-release Python versions: if either the profiler or target is running a pre-release (alpha, beta, or release candidate), both must run...
python, official-docs, cpython, P0
Local_Trusted_Corpus
17be6616-dc94-4588-9fb8-882fe97357e0
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,000
supabase-export-v2
ec6c92f8d13b60ee
Running both wall-clock and CPU mode profiles can reveal whether a function's time is spent computing or waiting. If a 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.
trusted_official_docs
CPython Docs
Running both wall-clock and CPU mode profiles can reveal whether a function's time is spent computing or waiting. If a 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.
Running both wall-clock and CPU mode profiles can reveal whether a function's time is spent computing or waiting. If a 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.
python, official-docs, cpython, P0
Local_Trusted_Corpus
17f30b2c-d334-413d-be9f-49704fab5f66
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,091
supabase-export-v2
93d40bd7cad571e6
the stack, actively executing), not cumulative time including callees. Hovering over a frame shows comparison details including baseline time, current time, and the percentage change. Some call paths may disappear entirely between profiles. These are called **elided stacks** and occur when optimizations eliminate code ...
trusted_official_docs
CPython Docs
the stack, actively executing), not cumulative time including callees. Hovering over a frame shows comparison details including baseline time, current time, and the percentage change. Some call paths may disappear entirely between profiles. These are called **elided stacks** and occur when optimizations eliminate code ...
the stack, actively executing), not cumulative time including callees. Hovering over a frame shows comparison details including baseline time, current time, and the percentage change. Some call paths may disappear entirely between profiles. These are called **elided stacks** and occur when optimizations eliminate code ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
197e3bdc-0b49-4128-9f2c-8ce95b6de2b6
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,163
supabase-export-v2
b9470b385e972e23
display shows a "PROFILING COMPLETE" banner and freezes the final results. You can still navigate, sort, and filter the results before pressing :kbd:`q` to exit. Live mode is incompatible with output format options (:option:`--collapsed`, :option:`--flamegraph`, and so on) because it uses an interactive terminal interf...
trusted_official_docs
CPython Docs
display shows a "PROFILING COMPLETE" banner and freezes the final results. You can still navigate, sort, and filter the results before pressing :kbd:`q` to exit. Live mode is incompatible with output format options (:option:`--collapsed`, :option:`--flamegraph`, and so on) because it uses an interactive terminal interf...
display shows a "PROFILING COMPLETE" banner and freezes the final results. You can still navigate, sort, and filter the results before pressing :kbd:`q` to exit. Live mode is incompatible with output format options (:option:`--collapsed`, :option:`--flamegraph`, and so on) because it uses an interactive terminal interf...
python, official-docs, cpython, P0
Local_Trusted_Corpus
19d4e89f-92af-43dc-9dc9-a09fb85a1989
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,991
supabase-export-v2
1279c236dab8ec22
python -m profiling.sampling run --mode=wall script.py In wall-clock mode, samples are recorded whether the thread is actively executing Python code, waiting for 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 spe...
trusted_official_docs
CPython Docs
python -m profiling.sampling run --mode=wall script.py In wall-clock mode, samples are recorded whether the thread is actively executing Python code, waiting for 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 spe...
python -m profiling.sampling run --mode=wall script.py In wall-clock mode, samples are recorded whether the thread is actively executing Python code, waiting for 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 spe...
python, official-docs, cpython, P0
Local_Trusted_Corpus
1a70273d-95eb-4177-bb70-bb40794b2825
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,097
supabase-export-v2
bf3d03c9ae8f86d0
open the Firefox Profiler in your browser and load the JSON file. The profiler runs entirely client-side, so your profiling data never leaves your machine. Gecko format automatically collects additional metadata about GIL state and CPU activity, enabling analysis features specific to Python's threading model. The profi...
trusted_official_docs
CPython Docs
open the Firefox Profiler in your browser and load the JSON file. The profiler runs entirely client-side, so your profiling data never leaves your machine. Gecko format automatically collects additional metadata about GIL state and CPU activity, enabling analysis features specific to Python's threading model. The profi...
open the Firefox Profiler in your browser and load the JSON file. The profiler runs entirely client-side, so your profiling data never leaves your machine. Gecko format automatically collects additional metadata about GIL state and CPU activity, enabling analysis features specific to Python's threading model. The profi...
python, official-docs, cpython, P0
Local_Trusted_Corpus
1abcad87-fb0f-4b46-8fc6-b9e77c79cd47
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,987
supabase-export-v2
02003463a1ce13fe
Profiling modes =============== The sampling profiler supports four modes that control which samples are recorded. The mode determines what the profile measures: total elapsed time, CPU execution time, time spent holding the global interpreter lock, or exception handling.
trusted_official_docs
CPython Docs
Profiling modes =============== The sampling profiler supports four modes that control which samples are recorded. The mode determines what the profile measures: total elapsed time, CPU execution time, time spent holding the global interpreter lock, or exception handling.
Profiling modes =============== The sampling profiler supports four modes that control which samples are recorded. The mode determines what the profile measures: total elapsed time, CPU execution time, time spent holding the global interpreter lock, or exception handling.
python, official-docs, cpython, P0
Local_Trusted_Corpus
1b904996-279c-4f9f-86a2-bbc1f333f4cf
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,984
supabase-export-v2
4244a84f90a185b3
may indicate that the profiler could not keep up with the requested sampling rate, often due to system load or an overly aggressive interval setting. **Missed samples** is the percentage of expected samples that were not collected. Based on the configured interval and duration, the profiler expects to collect a certain...
trusted_official_docs
CPython Docs
may indicate that the profiler could not keep up with the requested sampling rate, often due to system load or an overly aggressive interval setting. **Missed samples** is the percentage of expected samples that were not collected. Based on the configured interval and duration, the profiler expects to collect a certain...
may indicate that the profiler could not keep up with the requested sampling rate, often due to system load or an overly aggressive interval setting. **Missed samples** is the percentage of expected samples that were not collected. Based on the configured interval and duration, the profiler expects to collect a certain...
python, official-docs, cpython, P0
Local_Trusted_Corpus
1bab38f0-a7b8-4a25-8e38-abb848d8bed7
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,259
supabase-export-v2
97e90854a50b3d71
.. option:: --browser Automatically open HTML output (:option:`--flamegraph` and :option:`--heatmap`) in your default web browser after generation. When profiling with :option:`--subprocesses`, only the main process opens the browser; subprocess outputs are never auto-opened.
trusted_official_docs
CPython Docs
.. option:: --browser Automatically open HTML output (:option:`--flamegraph` and :option:`--heatmap`) in your default web browser after generation. When profiling with :option:`--subprocesses`, only the main process opens the browser; subprocess outputs are never auto-opened.
.. option:: --browser Automatically open HTML output (:option:`--flamegraph` and :option:`--heatmap`) in your default web browser after generation. When profiling with :option:`--subprocesses`, only the main process opens the browser; subprocess outputs are never auto-opened.
python, official-docs, cpython, P0
Local_Trusted_Corpus
20d6efb1-5958-40b3-ba8f-a9f13e2d2d09
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,862
supabase-export-v2
014839ed8b0165be
python -m profiling.sampling attach --live 12345 python -m profiling.sampling attach --flamegraph -d 30 -o profile.html 12345 On most systems, attaching to another process requires appropriate permissions. See :ref:`profiling-permissions` for platform-specific requirements.
trusted_official_docs
CPython Docs
python -m profiling.sampling attach --live 12345 python -m profiling.sampling attach --flamegraph -d 30 -o profile.html 12345 On most systems, attaching to another process requires appropriate permissions. See :ref:`profiling-permissions` for platform-specific requirements.
python -m profiling.sampling attach --live 12345 python -m profiling.sampling attach --flamegraph -d 30 -o profile.html 12345 On most systems, attaching to another process requires appropriate permissions. See :ref:`profiling-permissions` for platform-specific requirements.
python, official-docs, cpython, P0
Local_Trusted_Corpus
252907eb-39b7-4616-bf42-715e7fc3bde0
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,117
supabase-export-v2
68e46e15003da6db
.. figure:: tachyon-heatmap-with-opcodes.png :alt: Heatmap with expanded bytecode panel :align: center :width: 100% Expanding a hot line reveals the bytecode instructions executed, including specialized variants. The panel shows sample counts per instruction and the overall specialization percentage for the line.
trusted_official_docs
CPython Docs
.. figure:: tachyon-heatmap-with-opcodes.png :alt: Heatmap with expanded bytecode panel :align: center :width: 100% Expanding a hot line reveals the bytecode instructions executed, including specialized variants. The panel shows sample counts per instruction and the overall specialization percentage for the line.
.. figure:: tachyon-heatmap-with-opcodes.png :alt: Heatmap with expanded bytecode panel :align: center :width: 100% Expanding a hot line reveals the bytecode instructions executed, including specialized variants. The panel shows sample counts per instruction and the overall specialization percentage for the line.
python, official-docs, cpython, P0
Local_Trusted_Corpus
25339fa9-5320-4688-8776-40229b1441f3
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,821
supabase-export-v2
782de77e3201f624
intervals produce more reliable results---they collect more samples. For most performance analysis, the default settings provide sufficient accuracy to identify bottlenecks and guide optimization efforts. Because sampling is statistical, results will vary slightly between runs. A function showing 12% in one run might s...
trusted_official_docs
CPython Docs
intervals produce more reliable results---they collect more samples. For most performance analysis, the default settings provide sufficient accuracy to identify bottlenecks and guide optimization efforts. Because sampling is statistical, results will vary slightly between runs. A function showing 12% in one run might s...
intervals produce more reliable results---they collect more samples. For most performance analysis, the default settings provide sufficient accuracy to identify bottlenecks and guide optimization efforts. Because sampling is statistical, results will vary slightly between runs. A function showing 12% in one run might s...
python, official-docs, cpython, P0
Local_Trusted_Corpus
2539992b-c50e-4c22-8223-9557ceb75794
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,934
supabase-export-v2
8042933f6307dda8
Blocking mode ------------- By default, Tachyon reads the target process's memory without stopping it. This non-blocking approach is ideal for most profiling scenarios because it imposes virtually zero overhead on the target application: the profiled program runs at full speed and is unaware it is being observed.
trusted_official_docs
CPython Docs
Blocking mode ------------- By default, Tachyon reads the target process's memory without stopping it. This non-blocking approach is ideal for most profiling scenarios because it imposes virtually zero overhead on the target application: the profiled program runs at full speed and is unaware it is being observed.
Blocking mode ------------- By default, Tachyon reads the target process's memory without stopping it. This non-blocking approach is ideal for most profiling scenarios because it imposes virtually zero overhead on the target application: the profiled program runs at full speed and is unaware it is being observed.
python, official-docs, cpython, P0
Local_Trusted_Corpus
25c71a4c-cedf-4eb9-8832-15eb6720842f
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,979
supabase-export-v2
885a57a947def1c0
to prevent resource exhaustion in programs that spawn many processes. If this limit is reached, additional subprocesses are not profiled and a warning is printed. The :option:`--subprocesses` option is incompatible with :option:`--live` mode because live mode uses an interactive terminal interface that cannot accommoda...
trusted_official_docs
CPython Docs
to prevent resource exhaustion in programs that spawn many processes. If this limit is reached, additional subprocesses are not profiled and a warning is printed. The :option:`--subprocesses` option is incompatible with :option:`--live` mode because live mode uses an interactive terminal interface that cannot accommoda...
to prevent resource exhaustion in programs that spawn many processes. If this limit is reached, additional subprocesses are not profiled and a warning is printed. The :option:`--subprocesses` option is incompatible with :option:`--live` mode because live mode uses an interactive terminal interface that cannot accommoda...
python, official-docs, cpython, P0
Local_Trusted_Corpus
28ee264c-f42d-4abb-b600-c0414839b6e5
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,889
supabase-export-v2
4598d8097013a5c7
# Convert binary to flame graph python -m profiling.sampling replay --flamegraph -o output.html profile.bin # Convert binary to gecko format for Firefox Profiler python -m profiling.sampling replay --gecko -o profile.json profile.bin
trusted_official_docs
CPython Docs
# Convert binary to flame graph python -m profiling.sampling replay --flamegraph -o output.html profile.bin # Convert binary to gecko format for Firefox Profiler python -m profiling.sampling replay --gecko -o profile.json profile.bin
# Convert binary to flame graph python -m profiling.sampling replay --flamegraph -o output.html profile.bin # Convert binary to gecko format for Firefox Profiler python -m profiling.sampling replay --gecko -o profile.json profile.bin
python, official-docs, cpython, P0
Local_Trusted_Corpus
29c82a11-b3ac-49f5-9942-147e732678bd
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,877
supabase-export-v2
0b237660f0123168
``--no-gc`` Hide the synthetic ``<GC>`` frames that mark active garbage collection. ``--opcodes`` Annotate each 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...
trusted_official_docs
CPython Docs
``--no-gc`` Hide the synthetic ``<GC>`` frames that mark active garbage collection. ``--opcodes`` Annotate each 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...
``--no-gc`` Hide the synthetic ``<GC>`` frames that mark active garbage collection. ``--opcodes`` Annotate each 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...
python, official-docs, cpython, P0
Local_Trusted_Corpus
2b8e99b1-9846-4310-b532-45e8c394dac4
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,990
supabase-export-v2
c9852d729fa491aa
samples regardless of what the thread is doing. This is the default mode and provides a complete picture of where time passes during program execution:: python -m profiling.sampling run --mode=wall script.py
trusted_official_docs
CPython Docs
samples regardless of what the thread is doing. This is the default mode and provides a complete picture of where time passes during program execution:: python -m profiling.sampling run --mode=wall script.py
samples regardless of what the thread is doing. This is the default mode and provides a complete picture of where time passes during program execution:: python -m profiling.sampling run --mode=wall script.py
python, official-docs, cpython, P0
Local_Trusted_Corpus
2b9bcd4b-0eb3-40a9-bcac-8ce493aa3b58
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,966
supabase-export-v2
c52618fdb83a3c9c
python -m profiling.sampling run --subprocesses script.py python -m profiling.sampling attach --subprocesses 12345 When enabled, the profiler monitors the target process for child process creation. When a new Python child process is detected, a separate profiler instance is automatically spawned to profile it. This is ...
trusted_official_docs
CPython Docs
python -m profiling.sampling run --subprocesses script.py python -m profiling.sampling attach --subprocesses 12345 When enabled, the profiler monitors the target process for child process creation. When a new Python child process is detected, a separate profiler instance is automatically spawned to profile it. This is ...
python -m profiling.sampling run --subprocesses script.py python -m profiling.sampling attach --subprocesses 12345 When enabled, the profiler monitors the target process for child process creation. When a new Python child process is detected, a separate profiler instance is automatically spawned to profile it. This is ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
2c41eb24-c41d-4baf-a7fb-1990d1bbc5d8
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,123
supabase-export-v2
c35f547f9362597e
Binary format (:option:`--binary`) produces a compact binary file for efficient storage of profiling data:: python -m profiling.sampling run --binary -o profile.bin script.py python -m profiling.sampling attach --binary -o profile.bin 12345
trusted_official_docs
CPython Docs
Binary format (:option:`--binary`) produces a compact binary file for efficient storage of profiling data:: python -m profiling.sampling run --binary -o profile.bin script.py python -m profiling.sampling attach --binary -o profile.bin 12345
Binary format (:option:`--binary`) produces a compact binary file for efficient storage of profiling data:: python -m profiling.sampling run --binary -o profile.bin script.py python -m profiling.sampling attach --binary -o profile.bin 12345
python, official-docs, cpython, P0
Local_Trusted_Corpus
2f897ad5-4126-42bc-a208-e0474b4a33e6
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,154
supabase-export-v2
9362b1d46bc5977a
:kbd:`r` Reset all statistics and start fresh. This is disabled after profiling finishes to prevent accidental data loss. :kbd:`/` Enter filter mode to search for functions by name. The filter uses case-insensitive substring matching against the filename and function name. Type a pattern and press Enter to apply, or ...
trusted_official_docs
CPython Docs
:kbd:`r` Reset all statistics and start fresh. This is disabled after profiling finishes to prevent accidental data loss. :kbd:`/` Enter filter mode to search for functions by name. The filter uses case-insensitive substring matching against the filename and function name. Type a pattern and press Enter to apply, or ...
:kbd:`r` Reset all statistics and start fresh. This is disabled after profiling finishes to prevent accidental data loss. :kbd:`/` Enter filter mode to search for functions by name. The filter uses case-insensitive substring matching against the filename and function name. Type a pattern and press Enter to apply, or ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
30838c25-87c1-4a86-b57c-ce92f4541873
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,912
supabase-export-v2
2b933495869967c7
Version compatibility --------------------- The profiler and target process must run the same Python minor version (for example, both Python 3.15). Attaching from Python 3.14 to a Python 3.15 process is not supported.
trusted_official_docs
CPython Docs
Version compatibility --------------------- The profiler and target process must run the same Python minor version (for example, both Python 3.15). Attaching from Python 3.14 to a Python 3.15 process is not supported.
Version compatibility --------------------- The profiler and target process must run the same Python minor version (for example, both Python 3.15). Attaching from Python 3.14 to a Python 3.15 process is not supported.
python, official-docs, cpython, P0
Local_Trusted_Corpus
32387bca-3ea0-4fd3-b929-ca02cfa5af67
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,985
supabase-export-v2
65470ee03aeadc6b
the system is under heavy load. A small percentage of missed samples is normal and does not significantly affect the statistical accuracy of the profile. Both metrics are informational. Even with some failed attempts or missed samples, the profile remains statistically valid as long as enough samples were collected. Th...
trusted_official_docs
CPython Docs
the system is under heavy load. A small percentage of missed samples is normal and does not significantly affect the statistical accuracy of the profile. Both metrics are informational. Even with some failed attempts or missed samples, the profile remains statistically valid as long as enough samples were collected. Th...
the system is under heavy load. A small percentage of missed samples is normal and does not significantly affect the statistical accuracy of the profile. Both metrics are informational. Even with some failed attempts or missed samples, the profile remains statistically valid as long as enough samples were collected. Th...
python, official-docs, cpython, P0
Local_Trusted_Corpus
32cb0d63-cae6-4c8a-9c6f-8601dea7c2ab
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,183
supabase-export-v2
cc45b8d7c28e3943
no other task is currently awaiting) generate their own stack entries. Tasks being awaited by other tasks appear as part of their awaiter's stack instead. If a task has multiple awaiters (a diamond pattern in the task graph), the profiler deterministically selects one parent and annotates the task marker with the numbe...
trusted_official_docs
CPython Docs
no other task is currently awaiting) generate their own stack entries. Tasks being awaited by other tasks appear as part of their awaiter's stack instead. If a task has multiple awaiters (a diamond pattern in the task graph), the profiler deterministically selects one parent and annotates the task marker with the numbe...
no other task is currently awaiting) generate their own stack entries. Tasks being awaited by other tasks appear as part of their awaiter's stack instead. If a task has multiple awaiters (a diamond pattern in the task graph), the profiler deterministically selects one parent and annotates the task marker with the numbe...
python, official-docs, cpython, P0
Local_Trusted_Corpus
33b9497e-9fbf-4bdd-8d2c-155f4d6fb04a
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,871
supabase-export-v2
86b12a50802bde9d
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) When the target's source files are readable, ``dump`` prints the source line for each frame and highlights the executing expression.
trusted_official_docs
CPython Docs
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) When the target's source files are readable, ``dump`` prints the source line for each frame and highlights the executing expression.
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) When the target's source files are readable, ``dump`` prints the source line for each frame and highlights the executing expression.
python, official-docs, cpython, P0
Local_Trusted_Corpus
34730b25-5874-491c-acc9-ef75ae77a0eb
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,115
supabase-export-v2
ca1dcb0bc1905b68
with aggregate sample counts per folder - **Dark/light theme**: toggle with preference saved across sessions - **Line linking**: click line numbers to create shareable URLs When opcode-level profiling is enabled with :option:`--opcodes`, each hot line can be expanded to show which bytecode instructions consumed time:
trusted_official_docs
CPython Docs
with aggregate sample counts per folder - **Dark/light theme**: toggle with preference saved across sessions - **Line linking**: click line numbers to create shareable URLs When opcode-level profiling is enabled with :option:`--opcodes`, each hot line can be expanded to show which bytecode instructions consumed time:
with aggregate sample counts per folder - **Dark/light theme**: toggle with preference saved across sessions - **Line linking**: click line numbers to create shareable URLs When opcode-level profiling is enabled with :option:`--opcodes`, each hot line can be expanded to show which bytecode instructions consumed time:
python, official-docs, cpython, P0
Local_Trusted_Corpus
361e3fbf-9a01-4bb5-9d82-929be1a6f9c7
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,182
supabase-export-v2
42743b001a138513
tasks. These are synthetic frames inserted by the profiler to show the task structure. The task name appears as the function name in these frames. When a task awaits another task, the profiler reconstructs the logical call chain by following the ``await`` relationships. Only "leaf" tasks (tasks that no other task is cu...
trusted_official_docs
CPython Docs
tasks. These are synthetic frames inserted by the profiler to show the task structure. The task name appears as the function name in these frames. When a task awaits another task, the profiler reconstructs the logical call chain by following the ``await`` relationships. Only "leaf" tasks (tasks that no other task is cu...
tasks. These are synthetic frames inserted by the profiler to show the task structure. The task name appears as the function name in these frames. When a task awaits another task, the profiler reconstructs the logical call chain by following the ``await`` relationships. Only "leaf" tasks (tasks that no other task is cu...
python, official-docs, cpython, P0
Local_Trusted_Corpus
36300364-e20c-47e1-a468-4370dab2c63a
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,101
supabase-export-v2
56f71ea51e0b1251
.. figure:: tachyon-gecko-calltree.png :alt: Firefox Profiler Call Tree view :align: center :width: 100% The Call Tree view shows the complete call hierarchy with sample counts and percentages. The sidebar displays detailed statistics for the selected function including running time and sample distribution.
trusted_official_docs
CPython Docs
.. figure:: tachyon-gecko-calltree.png :alt: Firefox Profiler Call Tree view :align: center :width: 100% The Call Tree view shows the complete call hierarchy with sample counts and percentages. The sidebar displays detailed statistics for the selected function including running time and sample distribution.
.. figure:: tachyon-gecko-calltree.png :alt: Firefox Profiler Call Tree view :align: center :width: 100% The Call Tree view shows the complete call hierarchy with sample counts and percentages. The sidebar displays detailed statistics for the selected function including running time and sample distribution.
python, official-docs, cpython, P0
Local_Trusted_Corpus
39285ac0-cc32-4e73-a7b0-55506780fbad
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,041
supabase-export-v2
9668dcd8132e183e
The columns show sampling counts and estimated times: - **nsamples**: Displayed as ``direct/cumulative`` (for example, ``10/50``). Direct samples are when the function was at the top of the stack, actively executing. Cumulative samples are when the function appeared anywhere on the stack, including when it was waitin...
trusted_official_docs
CPython Docs
The columns show sampling counts and estimated times: - **nsamples**: Displayed as ``direct/cumulative`` (for example, ``10/50``). Direct samples are when the function was at the top of the stack, actively executing. Cumulative samples are when the function appeared anywhere on the stack, including when it was waitin...
The columns show sampling counts and estimated times: - **nsamples**: Displayed as ``direct/cumulative`` (for example, ``10/50``). Direct samples are when the function was at the top of the stack, actively executing. Cumulative samples are when the function appeared anywhere on the stack, including when it was waitin...
python, official-docs, cpython, P0
Local_Trusted_Corpus
39b9b90a-cfff-4b4b-a123-d3f0497b9d3a
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,885
supabase-export-v2
5ebb5294efbe6685
python -m profiling.sampling replay profile.bin python -m profiling.sampling replay --flamegraph -o profile.html profile.bin This command is useful when you have captured profiling data in binary format and want to analyze it later or convert it to a visualization format. Binary profiles can be replayed multiple times ...
trusted_official_docs
CPython Docs
python -m profiling.sampling replay profile.bin python -m profiling.sampling replay --flamegraph -o profile.html profile.bin This command is useful when you have captured profiling data in binary format and want to analyze it later or convert it to a visualization format. Binary profiles can be replayed multiple times ...
python -m profiling.sampling replay profile.bin python -m profiling.sampling replay --flamegraph -o profile.html profile.bin This command is useful when you have captured profiling data in binary format and want to analyze it later or convert it to a visualization format. Binary profiles can be replayed multiple times ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
3cea43dc-5077-4e8f-af42-42ab0938bd7d
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,113
supabase-export-v2
550a5a6474e26862
while cold lines (few or no samples) appear in cool colors. This view helps pinpoint exactly which lines of code are responsible for time consumption. The heatmap interface provides several interactive features:
trusted_official_docs
CPython Docs
while cold lines (few or no samples) appear in cool colors. This view helps pinpoint exactly which lines of code are responsible for time consumption. The heatmap interface provides several interactive features:
while cold lines (few or no samples) appear in cool colors. This view helps pinpoint exactly which lines of code are responsible for time consumption. The heatmap interface provides several interactive features:
python, official-docs, cpython, P0
Local_Trusted_Corpus
3ddec47a-efdd-4e74-ac13-185a9080cc66
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,908
supabase-export-v2
43e4f07836e5a07a
On macOS, the profiler uses ``task_for_pid()`` to access the target process. This requires one of: - Running as root - The profiler binary having the ``com.apple.security.cs.debugger`` entitlement - System Integrity Protection (SIP) being disabled (not recommended)
trusted_official_docs
CPython Docs
On macOS, the profiler uses ``task_for_pid()`` to access the target process. This requires one of: - Running as root - The profiler binary having the ``com.apple.security.cs.debugger`` entitlement - System Integrity Protection (SIP) being disabled (not recommended)
On macOS, the profiler uses ``task_for_pid()`` to access the target process. This requires one of: - Running as root - The profiler binary having the ``com.apple.security.cs.debugger`` entitlement - System Integrity Protection (SIP) being disabled (not recommended)
python, official-docs, cpython, P0
Local_Trusted_Corpus
3dfae560-317b-45ec-9206-fcc8c4c8c93d
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,824
supabase-export-v2
0512b127bd947be4
Statistical sampling is not ideal for every situation. For very short scripts that complete in under one 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.
trusted_official_docs
CPython Docs
Statistical sampling is not ideal for every situation. For very short scripts that complete in under one 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.
Statistical sampling is not ideal for every situation. For very short scripts that complete in under one 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.
python, official-docs, cpython, P0
Local_Trusted_Corpus
43439762-687d-4172-aed1-52d386817db4
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,030
supabase-export-v2
ddbe2666fb431104
uses exceptions for flow control (such as ``StopIteration`` in iterators) or in applications that process many error conditions (such as network servers handling connection failures). Exception mode helps answer questions like "how much time is spent handling exceptions?" and "which exception handlers are the most expe...
trusted_official_docs
CPython Docs
uses exceptions for flow control (such as ``StopIteration`` in iterators) or in applications that process many error conditions (such as network servers handling connection failures). Exception mode helps answer questions like "how much time is spent handling exceptions?" and "which exception handlers are the most expe...
uses exceptions for flow control (such as ``StopIteration`` in iterators) or in applications that process many error conditions (such as network servers handling connection failures). Exception mode helps answer questions like "how much time is spent handling exceptions?" and "which exception handlers are the most expe...
python, official-docs, cpython, P0
Local_Trusted_Corpus
45d73bac-b3b1-457c-90a4-bf84976c8d7c
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,936
supabase-export-v2
999f3c3d657160c3
the start and end of a single stack read, resulting in reconstructed stacks that mix frames from different execution states or that never actually existed. For these cases, the :option:`--blocking` option stops the target process during each sample::
trusted_official_docs
CPython Docs
the start and end of a single stack read, resulting in reconstructed stacks that mix frames from different execution states or that never actually existed. For these cases, the :option:`--blocking` option stops the target process during each sample::
the start and end of a single stack read, resulting in reconstructed stacks that mix frames from different execution states or that never actually existed. For these cases, the :option:`--blocking` option stops the target process during each sample::
python, official-docs, cpython, P0
Local_Trusted_Corpus
4a7aa0cb-2e3f-4ea2-adc8-3902a83a574a
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,043
supabase-export-v2
655940af48bf8e90
- **sample%** and **cumul%**: Percentages of total samples for direct and cumulative counts respectively. - **tottime** and **cumtime**: Estimated wall-clock time based on sample counts and the profiling duration. Time units are selected automatically based on the magnitude: seconds for large values, milliseconds for...
trusted_official_docs
CPython Docs
- **sample%** and **cumul%**: Percentages of total samples for direct and cumulative counts respectively. - **tottime** and **cumtime**: Estimated wall-clock time based on sample counts and the profiling duration. Time units are selected automatically based on the magnitude: seconds for large values, milliseconds for...
- **sample%** and **cumul%**: Percentages of total samples for direct and cumulative counts respectively. - **tottime** and **cumtime**: Estimated wall-clock time based on sample counts and the profiling duration. Time units are selected automatically based on the magnitude: seconds for large values, milliseconds for...
python, official-docs, cpython, P0
Local_Trusted_Corpus
4cd293ec-dd42-482b-bfb1-b7eea4984dba
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,084
supabase-export-v2
e3736005137288f5
# After modifying code, generate differential flamegraph python -m profiling.sampling run --diff-flamegraph baseline.bin -o diff.html script.py The visualization draws the current profile with frame widths showing current time consumption, then applies color to indicate how each function changed relative to the baselin...
trusted_official_docs
CPython Docs
# After modifying code, generate differential flamegraph python -m profiling.sampling run --diff-flamegraph baseline.bin -o diff.html script.py The visualization draws the current profile with frame widths showing current time consumption, then applies color to indicate how each function changed relative to the baselin...
# After modifying code, generate differential flamegraph python -m profiling.sampling run --diff-flamegraph baseline.bin -o diff.html script.py The visualization draws the current profile with frame widths showing current time consumption, then applies color to indicate how each function changed relative to the baselin...
python, official-docs, cpython, P0
Local_Trusted_Corpus
4fb141a1-2517-41f6-bc86-7e0565b5003f
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
35,930
supabase-export-v2
482352f9892a28b4
Python programs often use multiple threads, whether explicitly through the :mod:`threading` module or implicitly through libraries that manage thread pools. By default, the profiler samples only the main thread. The :option:`--all-threads` option (:option:`-a`) enables sampling of all threads in the process::
trusted_official_docs
CPython Docs
Python programs often use multiple threads, whether explicitly through the :mod:`threading` module or implicitly through libraries that manage thread pools. By default, the profiler samples only the main thread. The :option:`--all-threads` option (:option:`-a`) enables sampling of all threads in the process::
Python programs often use multiple threads, whether explicitly through the :mod:`threading` module or implicitly through libraries that manage thread pools. By default, the profiler samples only the main thread. The :option:`--all-threads` option (:option:`-a`) enables sampling of all threads in the process::
python, official-docs, cpython, P0
Local_Trusted_Corpus
50037ba2-6572-4a67-a0d6-59b7f634c591
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,142
supabase-export-v2
99756beccb6cc832
Live mode displays real-time profiling statistics, showing combined data from multiple threads in a multi-threaded application. The display updates continuously as new samples arrive, showing the current hottest functions. This mode requires the :mod:`curses` module, which is available on Unix-like systems but not on W...
trusted_official_docs
CPython Docs
Live mode displays real-time profiling statistics, showing combined data from multiple threads in a multi-threaded application. The display updates continuously as new samples arrive, showing the current hottest functions. This mode requires the :mod:`curses` module, which is available on Unix-like systems but not on W...
Live mode displays real-time profiling statistics, showing combined data from multiple threads in a multi-threaded application. The display updates continuously as new samples arrive, showing the current hottest functions. This mode requires the :mod:`curses` module, which is available on Unix-like systems but not on W...
python, official-docs, cpython, P0
Local_Trusted_Corpus
50bae6e5-eb53-4ea0-bbbc-6bf181c8fe1e
CPython Docs
file://datasets/cpython/Doc/library/profiling.sampling.rst
unknown
6cd88c34-20e3-456f-85bb-73037efbca1d
36,010
supabase-export-v2
e7c81728fd70e213
python -m profiling.sampling run --mode=gil script.py The GIL is held only while executing Python bytecode. When Python calls into C extensions, performs I/O operations, or executes native code, the GIL is typically released. This means GIL mode effectively measures time spent running Python code specifically, filterin...
trusted_official_docs
CPython Docs
python -m profiling.sampling run --mode=gil script.py The GIL is held only while executing Python bytecode. When Python calls into C extensions, performs I/O operations, or executes native code, the GIL is typically released. This means GIL mode effectively measures time spent running Python code specifically, filterin...
python -m profiling.sampling run --mode=gil script.py The GIL is held only while executing Python bytecode. When Python calls into C extensions, performs I/O operations, or executes native code, the GIL is typically released. This means GIL mode effectively measures time spent running Python code specifically, filterin...
python, official-docs, cpython, P0
Local_Trusted_Corpus