jVisualVM中采样和分析的区别

编程入门 行业动态 更新时间:2024-10-27 11:22:11
本文介绍了jVisualVM中采样和分析的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

VisualVM 有两个单独的选项卡用于采样和分析.VisualVM 中的采样和分析有​​什么区别?

VisualVM has two separate tabs for sampling and profiling. What is the difference between sampling and profiling in VisualVM?

推荐答案

Sampling 意味着进行大量线程转储并分析堆栈跟踪.这通常更快,不需要在您的字节码中进行运行时更改(这可能会破坏它),但也不太准确.

Sampling means taking lots of thread dumps and analyzing stack traces. This is usually faster, does not require runtime changes in your bytecode (which may break it), but is also less accurate.

Profiling 表示 检测你的类和方法,所以他们报告"每当他们运行.这更准确,因为它计算每次检测方法的调用,而不仅仅是在转储完成时捕获的那些.然而检测意味着你的类的字节码被改变了,这可能会破坏你的程序.实际上,出于这个原因,在大型应用程序服务器(如 JBoss 或 WebLogic)上使用分析通常会导致一切死机或挂起.

Profiling means instrumenting your classes and methods, so they "report" whenever they are run. This is more accurate, as it counts every invocation of instrumented method, not only those caught when the dump is done. However instrumentation means that the bytecode of your classes is changed, and this may break your program. Actually, for that reason, using profiling on large application servers (like JBoss, or WebLogic) often causes everything to die or hang.

这篇关于jVisualVM中采样和分析的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-03-19 08:37:49,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/639809.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:区别   jVisualVM

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!