简体   繁体   中英

How do you profile a Python script from Windows command line using PyPy and vmprof?

I have a Python script that I want to profile using vmprof to figure out what parts of the code are slow. Since PyPy is generally faster, I also want to profile the script while it is using the PyPy JIT. If the script is named myscript.py, how do you structure the command on the command line to do this?

I have already installed vmprof using

pip install vmprof

I would be suprised if it works, but the command is pypy -m vmprof myscript.py <your program args> . I would expect it to crash saying vmprof is not supported on windows.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM