-
Notifications
You must be signed in to change notification settings - Fork 88
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
pretty_print results in NO DATA #109
Comments
Can you share (at least a sketch of it) of what is done in this section? Are you trying to measure memory allocated only by that section of code in the initializer? You may also find running |
It runs database queries and caches some results in memory. If I just run
Yeah, exactly.
The issue is that this rails app is huge. I tried running around a larger block than the initializer and it used over 10GB and my laptop went out of memory, thus why I tried to just focus on this initializer. |
Thats strange. Just put a code similar to yours in a rails app's initializer, measuring Try to create a sample reproducible app. Maybe you (or some gem) monkey patched something. Try to step with the debugger through the |
I'm also seeing something like this:
|
@jcoyne You are seeing this because |
@fatkodima 🤦 Thanks I should have known that. It seems the same when I actually allocate stuff:
|
Thats because nothing is allocated from MemoryProfiler.report { 100.times { |i| [i, "#{i}"] } }.pretty_print |
Oh, I understood 'allow_files' to be the opposite of what it does. Thanks. |
I'm investigating memory usage in a Ruby on Rails 6 app. I wrote the following code around an initializer:
Normally, the process uses about 1GB and with the profiler, it uses about 6GB, so it's clearly doing something, but the results printed show
NO DATA
. The# My initializer
section above is definitely executing and doing a lot (I can see the print statements). Any thoughts?Ruby version:
Running on Linux Fedora 37 x64
The text was updated successfully, but these errors were encountered: