3

我正在尝试分析一组从maven surefire运行的测试。我发现了诸如此类的相关问题,而这并不是想要的。

有人可以推荐一个分析器,它可以让我测量测试套件的方法调用的挂钟持续时间(也就是说,我没有尝试将分析器附加到已经运行的应用程序)?

4

1 回答 1

1

这个答案对我有帮助。我已将以下内容添加到我的pom.xml

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <configuration>
        <argLine>-agentpath:/home/jshaw/yjp-12.0.2/bin/linux-x86-64/libyjpagent.so=tracing,onexit=snapshot,disablej2ee</argLine>
    </configuration>
</plugin>

然后,您可以在 maven 完成运行后从YourKit profiler加载快照。

于 2013-02-01T17:03:13.713 回答