开源 Java 分析器

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/948549/
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-11 21:26:00  来源:igfitidea点击:

Open Source Java Profilers

javaprofiler

提问by Hamza Yerlikaya

What can you guys recommend to use with Java?

你们推荐什么与Java一起使用?

Only requirement is it should be open source, or has not too expensive academic licence .

唯一的要求是它应该是开源的,或者没有太昂贵的学术许可证。

采纳答案by Chi

The VisualVM which comes with jdk6 has a basic profiler inside it. VisualVM is provided with the jdk, so if you have the jdk6 installed, you likely have it installed as well.

jdk6 附带的 VisualVM 内部有一个基本的分析器。VisualVM 与 jdk 一起提供,因此如果您安装了 jdk6,您可能也安装了它。

https://visualvm.github.io/

https://visualvm.github.io/

回答by Paul Morie

Netbeans IDE includes a free profiler.

Netbeans IDE 包括一个免费的分析器。

Also, if I remember correctly, the academic license for JProfiler is (relatively) inexpensive.

另外,如果我没记错的话,JProfiler 的学术许可证(相对)便宜。

回答by Adeel Ansari

Ah. Netbeans Profiler, developer.com's "Product of the Year" winner, in 2009.

啊。Netbeans Profiler,developer.com 的“年度产品”获奖者,2009 年。

回答by Peter Lawrey

Java has a basic built in profiler called HProf. I find it useful to compare the results it provides with results from more fully features profilers.

Java 有一个基本的内置分析器,称为HProf。我发现将它提供的结果与功能更完整的分析器的结果进行比较很有用。

回答by Martin Dirichs

If you are looking for a no-frills, easy to use open source profiler, you may want to take a look at Jip (Java Interactive Profiler). It's published under a BSD license. I found it to be quite useful for small programs. At least, the results it gives are way more easy to understand than hprofs output.

如果您正在寻找一种简洁、易于使用的开源分析器,您可能想看看 Jip(Java Interactive Profiler)。它是在 BSD 许可下发布的。我发现它对小程序非常有用。至少,它给出的结果比 hprofs 输出更容易理解。

回答by Mike Dunlavey

Thisis quick, dirty, and very effective: just take a few thread dumps, or pause the program several times, and look at the stack traces.

快速、肮脏且非常有效:只需进行几次线程转储,或多次暂停程序,然后查看堆栈跟踪。

回答by LB40

you've got a list here(listing them below, in-case link gets broken)

你在这里有一个列表(在下面列出它们,以防链接被破坏)

  • JMemProf
  • JMP
  • DrMem
  • JTreeProfiler
  • NetBeans Profiler
  • JAMon API
  • JBoss Profiler
  • MessAdmin
  • InfraRED
  • TomcatProbe
  • Java Interactive Profiler (JIP)
  • Profiler4j
  • Stopwatch
  • JMeasurement
  • DJProf
  • TIJmp
  • Allmon
  • Appspy
  • EurekaJ
  • japex
  • OKTECH Profiler
  • Perf4j
  • JMemProf
  • JMP
  • 医生
  • JTreeProfiler
  • NetBeans 分析器
  • 应用程序接口
  • JBoss 分析器
  • 管理员
  • 红外线的
  • Tomcat探针
  • Java 交互式分析器 (JIP)
  • Profiler4j
  • 跑表
  • J测量
  • DJ教授
  • TIJMP
  • 阿尔蒙
  • 应用间谍
  • 尤里卡
  • 贾佩克斯
  • OKTECH轮廓仪
  • 性能4j

回答by Kire Haglin

Java Mission Control, it's free to use for development and it integrates with Eclipse. It has very low overhead (<1%) since it piggybacks on the data the JVM is gathering anyway.

Java Mission Control,可免费用于开发并与 Eclipse 集成。它具有非常低的开销 (<1%),因为它搭载了 JVM 正在收集的数据。

It's very easy to use and it can also give a lot information you typically won't find in other profiling tools, e.g. latency profiling, online memory inspection, detailed gc statistics

它非常易于使用,还可以提供很多其他分析工具通常找不到的信息,例如延迟分析、在线内存检查、详细的 gc 统计信息

回答by MRalwasser

The open-source tool jvmtopdoes include a basic console profiler. Example output:

开源工具jvmtop确实包含一个基本的控制台分析器。示例输出:

 JvmTop 0.7.0 alpha - 15:16:34,  amd64,  8 cpus, Linux 2.6.32-27, load avg 0.41
 http://code.google.com/p/jvmtop

 Profiling PID 24015: org.apache.catalina.startup.Bootstrap

  36.16% (    57.57s) hudson.model.AbstractBuild.calcChangeSet()
  30.36% (    48.33s) hudson.scm.SubversionChangeLogParser.parse()
   7.14% (    11.37s) org.kohsuke.stapler.jelly.JellyClassTearOff.parseScript()
   6.25% (     9.95s) net.sf.json.JSONObject.write()
   3.13% (     4.98s) ....kohsuke.stapler.jelly.CustomTagLibrary.loadJellyScri()