New submission from Ben Spiller <spiller....@gmail.com>:

The built-in profiling modules only provide information about the main thread 
(at least when invoked as documented). 

To avoid user confusion we should state this in the documentation at 
https://docs.python.org/3/library/profile.html. 

Potentially we could also suggest mitigations such as manually creating a 
Profile instance in the user's thread code, but the most important thing is to 
make clear what the module does/does not do out of the box. 

(see also https://bugs.python.org/issue9609 which discusses a possible non-doc 
change to help with multi-threading, but looks like that's stalled, so best to 
push ahead with doc'ng this.

----------
assignee: docs@python
components: Documentation
messages: 355492
nosy: benspiller, docs@python
priority: normal
severity: normal
status: open
title: Document that cprofile/profile only profile the main thread
type: enhancement
versions: Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38607>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to