如何在JRuby中获取特定对象的ram足迹 [英] How to get the ram footprint of a specific object in JRuby
问题描述
是否可以查询JRuby中特定对象的ram足迹?
Is there a way to query the ram footprint of a specific object in JRuby?
推荐答案
Have you heard about jmap, jhat, and visualvm?
-
jmap输出给定Java进程的对象内存映射/堆内存详细信息.
jmap outputs the object memory maps / heap memory details for the given Java process.
jhat是一个堆分析工具,可让您创建Java堆转储,然后使用类似于SQL的语言对其进行查询以获取更多详细信息.
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.
visualvm是另一个Java工具,用于查看Java应用程序在JVM中运行时的详细信息.
visualvm is yet another Java tool for viewing details about a Java applications as they are running in the JVM.
我发现了这篇来自查尔斯·纳特(Charles Nutter)的帖子对我入门JRuby概要分析和内存检查非常有帮助.
I found this post from Charles Nutter to be very helpful in getting me started in JRuby profiling and memory inspection.
这篇关于如何在JRuby中获取特定对象的ram足迹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!