开发者

Remote start Java CPU Profiler like VisualVM but automated

开发者 https://www.devze.com 2023-01-16 20:28 出处:网络
Is there a way to remote start a CPU profiler (and specify package exclusions) like you can with the VisualVM tool (through I assume JMX).

Is there a way to remote start a CPU profiler (and specify package exclusions) like you can with the VisualVM tool (through I assume JMX).

We want to be able to automatically start a server run a stress test with a specific CPU profiler configuration enabled, and then export the results. Also is there any library that would allow you to parse the binary CPU profiler output (.nps file).

I think my best bet would be to dig through the VisualVM source code and see how they're doing it and copy that.

It appears that VisualVM uses some Netbeans library to do the parsing of the CPU profiler: * org.net开发者_如何学Pythonbeans.lib.profiler.results.cpu.StackTraceSnapshotBuilder


If a simple profiler is enough, you can integrate it into your application. I wrote one. It's also available with Apache license. I and my co-workers use it quite a lot. It's not perfect, but very easy to integrate.

0

精彩评论

暂无评论...
验证码 换一张
取 消