在 Eclipse 中分析 Java 应用程序?(插入)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1580091/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-12 16:27:15  来源:igfitidea点击:

Profiling a Java Application in Eclipse? (plug-in)

javaeclipseoptimizationprofilingplugins

提问by Nick Heiner

I'm looking to find bottlenecks in my Java application in Eclipse. I'm thinking this might be useful:

我希望在Eclipse 中找到我的 Java 应用程序中的瓶颈。我认为这可能有用:

http://www.eclipse.org/projects/project_summary.php?projectid=tptp.performance

http://www.eclipse.org/projects/project_summary.php?projectid=tptp.performance

Any other good plug-ins to use?

还有什么好用的插件吗?

EDITOK, it doesn't necessarily have to be an Eclipse plug-in. But it would be nice. And, I'm most interested in speed.

编辑好的,它不一定是 Eclipse 插件。但它会很好。而且,我对速度最感兴趣。

采纳答案by Thorbj?rn Ravn Andersen

If you can, use jvisualvmin the Sun Java 6 JDK (IBM too). It works out of the box and can answer many of the initial questions.

如果可以,在 Sun Java 6 JDK(IBM 也是)中使用jvisualvm。它开箱即用,可以回答许多最初的问题。

Note that on Windows you need to invoke jvisualvm with the same Java binary as the program you want to investigate for best results.

请注意,在 Windows 上,您需要使用与要调查的程序相同的 Java 二进制文件调用 jvisualvm 以获得最佳结果。

(visualvm is a stand-alone subset of the Netbeans profiler)

(visualvm 是 Netbeans 分析器的独立子集)

回答by Kevin

YourKitis an excellent commercial profiler that has good Eclipseintegration.

YourKit是一个优秀的商业分析器,具有良好的Eclipse集成。

回答by Mario Marinato

The Eclipse Memory Analyserhas been helping me a lot recently.

Eclipse的内存分析器最近已经帮助了我很多。

回答by Mike Dunlavey

回答by Michael Borgwardt

In my experience, TPTP is something to run away from as fast as possible. It's a horribly overengineered mess, almost impossible to get to work, badly documented, and slow as molasses.

根据我的经验,TPTP 是一种需要尽快逃避的东西。这是一个可怕的过度设计的烂摊子,几乎无法开始工作,记录不完整,并且像糖蜜一样缓慢。

I'm not aware of any good and free profiling plugins for eclipse. But then, does it really have to be an eclipse plugin? VisualVMcomes with the JDK since Java 6u7, is fast and easy to use. It may not be the most feature-rich of profilers, but has been sufficient for me.

我不知道有什么好的和免费的 eclipse 分析插件。但是,它真的必须是一个eclipse插件吗?VisualVM自 Java 6u7 起就随 JDK 一起提供,快速且易于使用。它可能不是功能最丰富的分析器,但对我来说已经足够了。

回答by zvikico

I found JProfiler(commercial) to be really helpful. It has Eclipse integration, although it is not an Eclipse plugin per sa', so you can very easily invoke a profiler instead of a regular execution session. It had very good bottleneck analysis and you can find-tune the settings to lower the overheads of the profiler itself. Highly recommended.

我发现JProfiler(商业)真的很有帮助。它具有 Eclipse 集成,尽管它不是每个 sa' 的 Eclipse 插件,因此您可以非常轻松地调用分析器而不是常规执行会话。它具有非常好的瓶颈分析,您可以找到调整设置以降低分析器本身的开销。强烈推荐。

回答by Jay Askren

I've also used the Netbeans profilerwhich is pretty good. It's pretty easy to set it up to profile your Eclipse project while it is running in Eclipse. You don't need to open the project in Netbeans.

我还使用了非常好的Netbeans 分析器。设置它以在 Eclipse 中运行时对 Eclipse 项目进行概要分析非常容易。您不需要在 Netbeans 中打开该项目。

回答by Kiran Subbaraman

If you are looking for a IBM JDK equivalent for visualvm, try the IBM Java Health Center: http://www.ibm.com/developerworks/java/jdk/tools/healthcenter/. It has some decent profiling capabilities, and is rather fast.

如果您正在寻找与visualvm 等效的IBM JDK,请尝试IBM Java Health Center:http: //www.ibm.com/developerworks/java/jdk/tools/healthcenter/。它有一些不错的分析功能,而且速度相当快。