Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit the number of memory records reported #491

Merged
merged 1 commit into from
Nov 9, 2023

Conversation

pablogsal
Copy link
Member

@pablogsal pablogsal commented Nov 3, 2023

No description provided.

@pablogsal pablogsal changed the title blegd Limit the number of memory records reported Nov 3, 2023
news/491.bugfix.rst Outdated Show resolved Hide resolved
src/memray/_memray.pyx Outdated Show resolved Hide resolved
src/memray/commands/common.py Outdated Show resolved Hide resolved
src/memray/_memray.pyi Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Nov 8, 2023

Codecov Report

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

Comparison is base (aa3470a) 92.16% compared to head (d812c77) 92.16%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #491   +/-   ##
=======================================
  Coverage   92.16%   92.16%           
=======================================
  Files          91       91           
  Lines       10872    10898   +26     
  Branches     1499     1507    +8     
=======================================
+ Hits        10020    10044   +24     
- Misses        849      851    +2     
  Partials        3        3           
Flag Coverage Δ
cpp 85.66% <ø> (-0.03%) ⬇️
python_and_cython 95.45% <96.29%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
src/memray/commands/flamegraph.py 100.00% <100.00%> (ø)
tests/integration/test_tracking.py 97.43% <100.00%> (+0.05%) ⬆️
src/memray/commands/common.py 86.91% <83.33%> (-0.34%) ⬇️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

src/memray/_memray.pyx Outdated Show resolved Hide resolved
src/memray/_memray.pyx Outdated Show resolved Hide resolved
src/memray/_memray.pyx Outdated Show resolved Hide resolved
For very big files, the generated reporters will hung when trying to
process all of the memory records produced. This happens quite a lot in
flamegraphs produced from very big files, where the browser cannot
display the ploy with millions of points.

To help here, add a new parameter to the FileReader class that limits
the number of memory records (and therefore temporal snapshots) stored
and reported. This should not affect most regular capture files but will
help with the very big ones.

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Co-authored-by: Matt Wozniski <godlygeek@gmail.com>
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Copy link
Contributor

@godlygeek godlygeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pablogsal pablogsal merged commit 694bf84 into bloomberg:main Nov 9, 2023
34 checks passed
@pablogsal pablogsal deleted the blegd branch November 9, 2023 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants