bloomberg / memray

Memray is a memory profiler for Python
https://bloomberg.github.io/memray/
Apache License 2.0
13.17k stars 392 forks source link

Disable leaks warning if tracing Python allocators #492

Closed godlygeek closed 10 months ago

godlygeek commented 10 months ago

We warn when generating a leaks report when pymalloc is in use, because the memory held by pymalloc would appear to us as a leak when it has actually just been set aside for future use.

But, when --trace-python-allocators is used, we do have visibility into whether the memory has set aside for future use, and so we don't need to show this warning in that case.

codecov-commenter commented 10 months ago

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (f33d028) 92.28% compared to head (8fc1e5c) 92.18%. Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #492 +/- ## ========================================== - Coverage 92.28% 92.18% -0.11% ========================================== Files 91 91 Lines 10849 10872 +23 Branches 1498 1499 +1 ========================================== + Hits 10012 10022 +10 - Misses 835 847 +12 - Partials 2 3 +1 ``` | [Flag](https://app.codecov.io/gh/bloomberg/memray/pull/492/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bloomberg) | Coverage Δ | | |---|---|---| | [cpp](https://app.codecov.io/gh/bloomberg/memray/pull/492/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bloomberg) | `85.74% <76.47%> (-0.33%)` | :arrow_down: | | [python_and_cython](https://app.codecov.io/gh/bloomberg/memray/pull/492/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bloomberg) | `95.45% <100.00%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bloomberg#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/bloomberg/memray/pull/492?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bloomberg) | Coverage Δ | | |---|---|---| | [src/memray/\_memray/record\_reader.cpp](https://app.codecov.io/gh/bloomberg/memray/pull/492?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bloomberg#diff-c3JjL21lbXJheS9fbWVtcmF5L3JlY29yZF9yZWFkZXIuY3Bw) | `77.03% <100.00%> (-1.00%)` | :arrow_down: | | [src/memray/\_memray/record\_writer.h](https://app.codecov.io/gh/bloomberg/memray/pull/492?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bloomberg#diff-c3JjL21lbXJheS9fbWVtcmF5L3JlY29yZF93cml0ZXIuaA==) | `95.65% <ø> (ø)` | | | [src/memray/\_memray/records.h](https://app.codecov.io/gh/bloomberg/memray/pull/492?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bloomberg#diff-c3JjL21lbXJheS9fbWVtcmF5L3JlY29yZHMuaA==) | `100.00% <ø> (ø)` | | | [src/memray/\_metadata.py](https://app.codecov.io/gh/bloomberg/memray/pull/492?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bloomberg#diff-c3JjL21lbXJheS9fbWV0YWRhdGEucHk=) | `100.00% <100.00%> (ø)` | | | [tests/integration/test\_main.py](https://app.codecov.io/gh/bloomberg/memray/pull/492?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bloomberg#diff-dGVzdHMvaW50ZWdyYXRpb24vdGVzdF9tYWluLnB5) | `92.61% <100.00%> (+0.18%)` | :arrow_up: | | [tests/unit/test\_stats\_reporter.py](https://app.codecov.io/gh/bloomberg/memray/pull/492?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bloomberg#diff-dGVzdHMvdW5pdC90ZXN0X3N0YXRzX3JlcG9ydGVyLnB5) | `100.00% <ø> (ø)` | | | [src/memray/\_memray/record\_writer.cpp](https://app.codecov.io/gh/bloomberg/memray/pull/492?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bloomberg#diff-c3JjL21lbXJheS9fbWVtcmF5L3JlY29yZF93cml0ZXIuY3Bw) | `85.46% <71.42%> (-0.41%)` | :arrow_down: | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/bloomberg/memray/pull/492/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bloomberg)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.