[New-bugs-announce] [issue46507] enabling cProfile to profile code given as an argument "à la" timeit
julien tayon
report at bugs.python.org
Mon Jan 24 16:25:45 EST 2022
New submission from julien tayon <julien at tayon.net>:
well, you want to use
python3 -mcProfile -othis.prof 'oneliner in python to test something'
And weirdly enough this normally expected behaviour does not work.
It's because last argument is expected to be the path of the script name to profile.
But, it can be fixed easily with no downside
Since it is an expected behaviour and is minimal changing anything in documentation or news seems to superfluous
An exemple of « this is a standard de fait » is the fact that the awesome module of vstinner timeit does this already.
https://github.com/python/cpython/pull/30859
----------
components: Library (Lib)
messages: 411517
nosy: jul2, vstinner
priority: normal
pull_requests: 29042
severity: normal
status: open
title: enabling cProfile to profile code given as an argument "à la" timeit
type: enhancement
versions: Python 3.10, Python 3.11, Python 3.7, Python 3.8, Python 3.9
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46507>
_______________________________________
More information about the New-bugs-announce
mailing list