[issue46507] enabling cProfile to profile code given as an argument "à la" timeit

Daniël van Noord report at bugs.python.org
Wed Mar 16 04:31:29 EDT 2022


Daniël van Noord <breeuwer.dragonder.0a at icloud.com> added the comment:

There were some comments on the (now closed) PR associated to this report.

One was about requiring a new flag to tell cProfile to consider the code in question code instead of a file path. `-c` was proposed, I presume abbreviating `--code`. Is this indeed the way to go? Allow `cProfile` to profile code directly by supplying the `-c` or `--code` argument, which indicates that the last argument should be considered code instead of a file path?

----------
nosy: +danielnoord

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46507>
_______________________________________


More information about the Python-bugs-list mailing list