绘制应用程序内存和CPU性能指标的图表Java Netbeans [英] Graphing application Memory and CPU performance metrics Java Netbeans

查看:131
本文介绍了绘制应用程序内存和CPU性能指标的图表Java Netbeans的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我意识到有很多与此问题类似的问题,但是其中一些答案已经过时,并且我不确定现在Java开发人员可以使用哪些更好的问题.

I realize there are plenty of questions similar to this one but some of the answers are dated and I'm not sure there is something better available to Java developers now.

我不是要查找应用程序问题.我需要随着时间显示图形"内存和cpu使用情况.我尝试使用NetBeans随附的JVisualVM Profiler,但是该应用程序包含4个独立的进程,这些进程同时运行并相互通信.

I am not trying to find a problem with an application. I need to show 'graphically' memory and cpu usage over time. I tried using the JVisualVM Profiler that comes with NetBeans but the application consists of 4 separate processes running simultaneously and communicating with each other.

我需要找到平台内存裕量(最坏情况下的内存使用率和平均内存使用率).还有CPU使用率处理器的吞吐量裕度(包括空闲任务所花费的时间百分比).

I need to find the platform memory margin (worst case memory usage and average memory usage). Also the CPU Usage processor throughput margin (including % of time spent in idle task).

我已经看到过一些听起来很有前途但仅适用于Windows的工具.我看过看起来像Java的代码可以通过编写一些代码为我提供所需的信息.我在这里看到了很多很好的信息,但是我仍然不确定为我的应用程序收集平台性能指标的最佳方法.

I've seen mention of tools that sound promising but are only available for Windows. I've seen code that looks like Java can give me the information I need by writing some code. I've seen a lot of good information out here but I'm still not sure the best way to gather platform performance metrics for my application.

因此,冒着听起来我还没有进行足够研究的风险,我不得不问一下,因为事实恰恰相反.我研究的越多,我就会越困惑.我需要找到收集这些信息的最快,最简单的方法,并希望就此方法提出任何建议.

So, at the risk of sounding like I haven't researched this enough, I have to ask because really quite the contrary. The more I research the more confused I get. I need to find the quickest and easiest way to gather this information and would be grateful for any suggestions on the way to approach this.

其他信息:

大多数性能工具旨在帮助人们查找应用程序中的内存泄漏和cpu使用情况.我正在尝试找到一种工具,可以在我的应用程序运行时帮助我找到三件事:

Most performance tools are geared toward helping one find memory leaks and cpu usage in an application. I am trying to find a tool that will assist me in finding three things while my application is running:

1) Memoey Usge - platform memory margin:
   - Worst case memory usage
   - Average memory usage

2) CPU Usage - processor throughput margin
   - Usage = 100% - (%of time spent in idle task)
   - % time in idle task = (average period of background task with no load)*100% / (average period of background task with some load)

3) Availability - fraction of time the platform and application are available for use (related to mean time between failures)

也许这不是一个艰巨的任务,但是我不知道如何使用VisualVM或任何其他工具来做到这一点.我是否必须找到一种方法来记录数据并自己处理这些信息?如果是这样,那么外面有没有做过这方面的经验的人,可以给我一些见识?

Perhaps this is not a difficult task but I have no idea how to do this using VisualVM or any other tool. Must I find a way to log the data and process this information myself? If so, does anyone out there have experience in doing this who can give me some insight?

谢谢

推荐答案

数据可以通过JMX界面以

The data is programmatically available through the JMX interface as management beans

这篇关于绘制应用程序内存和CPU性能指标的图表Java Netbeans的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆