Clarify that attach --duration keeps tracking in the background#909
Conversation
godlygeek
left a comment
There was a problem hiding this comment.
This looks basically good to me. I have 2 small changes I'd like to request.
However, on top of those changes, this branch should only have the one commit on it (it shouldn't have the change from #907 in it) and it needs a Signed-off-by line with your real name in the commit message.
If you amend your commit message to have the right signoff, with:
git commit --amend -C HEAD -m "Signed-off-by: Suyog Bhise <bhise.suyog@gmail.com>"
git push --force-with-leasethen I can drop the other commit and make the other small changes and land this.
|
This one still needs the |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #909 +/- ##
==========================================
- Coverage 92.44% 92.37% -0.07%
==========================================
Files 99 99
Lines 11786 11788 +2
Branches 428 429 +1
==========================================
- Hits 10895 10889 -6
- Misses 891 899 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
memray attach -o ... --duration N exits as soon as the tracker is injected; the target process keeps recording for N seconds. This is documented but has surprised multiple users (bloomberg#701, bloomberg#831). Print a notice on exit pointing at memray detach for early stop, and call out the background behavior explicitly in the attach docs. Closes bloomberg#831 Signed-off-by: Suyog Bhise <bhise.suyog@gmail.com>
dd455cd to
fbc6d21
Compare
Summary
memray attach -o ... --duration Nexits as soon as the tracker is injected; the target process keeps recording forN seconds. Documented, but has surprised multiple users (
attachignores--duration#701, memray attach with --duration exits immediately instead of tracking for the given time #831).memray detachfor early stop.docs/attach.rst.Test plan
memray attach -o out.bin --duration 10 <pid>prints the new notice and exits.memray detach <pid>still stops tracking before duration elapses.tests/unit/test_attach.pypasses.Closes #831