Closed mrks-g closed 11 months ago
It needs to go before the -m
, as everything after that is taken as the module to run and the arguments for that module.
python3 -m memray run --leaks -m server.start
Did not mentioned that I tried this already. The result is a unrecognized argument error:
memray: error: unrecognized arguments: --leaks
Oh, my bad. Arguments to memray run
do need to go before the -m
, but --leaks
is an argument for the reporter you're using, not for memray run
So, something like:
python3 -m memray run --trace-python-allocators -o output.bin -m server.start
python3 -m memray flamegraph --leaks output.bin
Is there an existing issue for this?
Current Behavior
Starting memray with the --leaks option does not work as expected on wsl2.
python3 -m memray run -m server.start --leaks
the leaks-option is interpreted as a module attribute to server.start. How to use this option correctly?
Expected Behavior
I expected memray to start with the --leaks option.
Steps To Reproduce
ubuntu 22.04 python3 -m pip install memray python3 -m memray run -m server.start --leaks
Memray Version
1.11.0
Python Version
3.10
Operating System
Linux
Anything else?
No response