How to use memray with Gunicorn or flask dev server?

29 views Asked by At

I want to profile my flask project memory using memray. In the documentation it is said to use the command as:

memray run my_script.py 

But when I run flask (using dev server) or gunicorn I don't define the entry script:

flask run -port 80

So when I try to run the same thing but with memray:

memray run flask run -port 80

it throws an error saying FileNotFoundError: [Errno 2] No such file or directory: 'flask'.

How to achieve this?

0

There are 0 answers