Closed ivonastojanovic closed 1 year ago
Attention: 9 lines
in your changes are missing coverage. Please review.
Comparison is base (
baf7f41
) 91.96% compared to head (56d5b3a
) 92.15%. Report is 1 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I've pushed quite a few fixup commits here to make various improvements. Most of them are pretty small things. The biggest one is refactoring the thread for the heap size check so that it can be cancelled, like the duration check one can. I also moved the global state to be attributes of the memray
module, as we discussed above.
@ivonastojanovic Please review my changes and let me know if you spot any mistakes, bugs, issues, or shortcomings. Each of the fixup commits has a short explanation of why it was made, but I typed those up quickly, so also let me know if you don't understand the purpose of one of the changes.
OK, I've updated this PR to make memray detach
a separate command, and to fix the small issue with your fixup that caused the CI to fail. Take a look when you can, @pablogsal
Oh, and https://godlygeek.github.io/memray/attach.html#cli-reference shows how the docs changes render.
After some offline discussions, @pablogsal and I have decided to drop --heap-limit
from this PR. The name is misleading, since the implementation is looking at maximum RSS rather than at the size of the heap, and it refuses to work reliably on i686 for reasons we haven't managed to track down (operations that we expect to be raising ru_maxrss
appear not to, though only on i686 and not on x86-64 or arm64).
Instead, our plan is to add a way to set these limits when Tracker
is created and installed, and have it enforce the limits itself. That change will come in a future release, though. For now, we're going to remove the option from this PR to unblock the way for including the rest of this work in a release.
Letting memray attach supports deactivating an attached tracker manually, or after a specified heap size is reached, or after a specified time limit has elapsed.
Issue number of the reported bug or feature request: #
Describe your changes A clear and concise description of the changes you have made.
Testing performed Describe the testing you have performed to ensure that the bug has been addressed, or that the new feature works as planned.
Additional context Add any other context about your contribution here.