How to get the ram footprint of a specific object in JRuby

点点圈 提交于 2020-01-16 08:51:30

问题


Is there a way to query the ram footprint of a specific object in JRuby?


回答1:


Have you heard about jmap, jhat, and visualvm?

  1. jmap outputs the object memory maps / heap memory details for the given Java process.

  2. jhat is a heap analysis tool that lets you create a Java heap dump, and then lets you query it using a SQL-like language to get more detail.

  3. visualvm is yet another Java tool for viewing details about a Java applications as they are running in the JVM.

I found this post from Charles Nutter to be very helpful in getting me started in JRuby profiling and memory inspection.



来源:https://stackoverflow.com/questions/8327049/how-to-get-the-ram-footprint-of-a-specific-object-in-jruby

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!