Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在我的脚本中使用 cProfiler。我想输出带有结果的 .cprofile 文件。我想获取人类不可读的输出文件,然后在snakeviz中打开它。那可能吗?
我无法使用
python -m cProfile -o program.prof my_program.py
命令,因为我在 gui 模式下使用嵌入在 Autodesk Maya 软件中的 Python 解释器运行脚本。
好吧,我问得太早了。我发现:
cProfile.run('function', 'path')
可以这样做