简体   繁体   English

如何以编程方式使用Netbeans Profiler?

[英]How to use the Netbeans Profiler programmatically?

I want to be able to do some profiling to some app using the Netbeans Profiler API. 我希望能够使用Netbeans Profiler API对某些应用程序进行性能分析。 I'm not interested in using Visual VM , but rather in programmatically collecting data from the application[let's say CPU usage, and method execution times]. 我对使用Visual VM不感兴趣,但是对以编程方式从应用程序中收集数据不感兴趣(比如说CPU使用率和方法执行时间)。 For instance, using CPU usage and hot methods. 例如,使用CPU使用率和热门方法。 How to get that data and print it on console for instance? 例如,如何获取该数据并将其打印在控制台上?

This was from Jiri Sedlacek - one of the VisualVM develpers: 这是来自Jiri Sedlacek的-VisualVM开发人员之一:

There's nothing like 'Netbeans Profiler API', the profiler doesn't have any API for public usage. 没有像“ Netbeans Profiler API”那样的东西,Profiler没有任何可供公共使用的API。 Neither VisualVM nor the NetBeans Profiler will help you with this VisualVM和NetBeans Profiler都无法帮助您解决此问题

So that's it folks! 就是这样!

JRockit Mission Control have according to new and noteworthy for the 3.1 release a public API that be used to subscribe to JMX-data and to establish connections to local/remote servers. JRockit Mission Control已针对3.1发行版发布了新的和值得注意的公共API,该API用于订阅JMX数据并建立与本地/远程服务器的连接。 See at the bottom of the page. 请参阅页面底部。

For the sake of providing the updated information: Netbeans is code is public under https://github.com/apache/incubator-netbeans 为了提供更新的信息:Netbeans是代码是在https://github.com/apache/incubator-netbeans下公开的

Under the module profiler, the code can be used for getting required information programmatically. 在模块分析器下,该代码可用于以编程方式获取所需的信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM