java - maven/visualvm : how can i use visualvm to profile a running surefire process?

标签 java maven visualvm jvisualvm

我可以附加到 surefire 进程,但尝试分析它显示采样:

CPU sampling:
Not available. Failed to create JMX connection to target application. Use 'Add JMX Connection' action to attach to the application.

Memory sampling:
Not available. Failed to read objects in target application. Check the logfile for details (use Help | About | Logfile).

尝试开始分析时显示一个空的错误消息框

最佳答案

正如它所说的“无法创建 JMX 连接”,在启动 maven 时启用 jmx 怎么样? 这里有个问题how to activate jmx我认为您可以使用 MAVEN_OPTS 或 JAVA_OPTS 向 Maven 提供这些参数。

关于java - maven/visualvm : how can i use visualvm to profile a running surefire process?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14980266/

相关文章:

java - Apache POI Excel - 如何配置要扩展的列?

maven - 将 XJB 与 jaxb2-maven-plugin 一起使用

java - 调试 VisualVM 远程连接

java - VisualVM OQL : find object that has (indirect) reachables/references to two object IDs?

java - Runtime exec无法运行appdata中的程序?

java - 和之间的区别

maven - maven 支持 kapt 吗?

maven - Intellij IDEA 部署缓慢(过时)

java - VisualVM 无​​法在 Windows 10 上运行 : jpswin2

java - 在 Hadoop 中设置可写?