[英]Measuring performance for network Java application
We want to automatically measure performance of our Java product. 我们想要自动衡量我们Java产品的性能。
We want to have following metrics: 我们希望具有以下指标:
We want to run those performance tests continuously on Jenkins server. 我们希望在Jenkins服务器上连续运行那些性能测试。 Project related performance metrics and system metrics above, will be displayed as some trend graphs.
以上与项目相关的性能指标和系统指标将显示为一些趋势图。
Could you please suggest a Java performance framework or maybe, approach, to measure system metrics automatically? 您能否提出一个Java性能框架或方法来自动测量系统指标?
I found a list of open source performance test tools and considering to use JMeter
Java Sampler and running it from Java code. 我找到了一系列开放源代码性能测试工具,并考虑使用
JMeter
Java Sampler并从Java代码运行它。 But I am not familiar enough with JMeter
and not sure that this is a proper choice. 但是我对
JMeter
不够熟悉,并且不确定这是否是正确的选择。
You will likely want to use some kind of JMX monitoring / profiling tool, such as VisualVM, https://visualvm.java.net/ . 您可能想要使用某种JMX监视/性能分析工具,例如VisualVM, https ://visualvm.java.net/。 It gives detailed processor load, memory load (split by JVM memory pool), and you can extend it to add your own metrics by writing custom MBeans in your code.
它提供了详细的处理器负载,内存负载(由JVM内存池划分),您可以通过在代码中编写自定义MBean对其进行扩展,以添加自己的指标。
I worked on building a monitoring webapp at a previous job - it periodically collected information from servers via JMX, and pinged that information to a Graphite instance so we could track the metrics over long time periods. 我在上一份工作中构建了一个监视Web应用程序-它通过JMX定期从服务器收集信息,并将该信息ping到Graphite实例,以便我们可以长时间跟踪指标。 You could consider doing a similar thing.
您可以考虑做类似的事情。 VisualVM is a good interim solution though.
VisualVM是一个很好的临时解决方案。
JMeter is a good choice as it's free and open source, it can scale, it is Java-based and can be easily added as a task to CI process. JMeter是一个不错的选择,因为它是免费的开源软件,它可以扩展,基于Java,并且可以轻松地作为任务添加到CI流程中。
References: 参考文献:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.