I'd like to allow the user to explicitly request persisting the binary files via a --memray-persist-bin flag that can take a folder as an argument. This would change the folder where the temporary files are stored from temporary to the passed in argument. To help identify which binary belongs to which test I'd also propose to add the test name (pyfuncitem.nodeid - might need to normalize the test name for characters not allowed on the path) as a suffix (after the uuid).
This would allow users to do further analysis of the binary files after the run (such as generating a flamegraph). This could be also used for #7. Most often I imagine this using in form of:
Users could rewrite their test as a python module invocation and use memray directly. The downside is that making fixtures work as function calls can be complicated.
Feature Request
I'd like to allow the user to explicitly request persisting the binary files via a
--memray-persist-bin
flag that can take a folder as an argument. This would change the folder where the temporary files are stored from temporary to the passed in argument. To help identify which binary belongs to which test I'd also propose to add the test name (pyfuncitem.nodeid
- might need to normalize the test name for characters not allowed on the path) as a suffix (after the uuid).This would allow users to do further analysis of the binary files after the run (such as generating a flamegraph). This could be also used for #7. Most often I imagine this using in form of:
Describe alternatives you've considered
Users could rewrite their test as a python module invocation and use memray directly. The downside is that making fixtures work as function calls can be complicated.