views:

27

answers:

1

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.netbeans.lib.profiler.results.cpu.StackTraceSnapshotBuilder

+1  A: 

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.

Thomas Mueller
This looks awesome, I've been digging through the VisualVM and Netbeans profiler source code, and I think I could combine it with your profiler to create a remote version of the profiler that you could to a JVM through JMX and then detach.
Dougnukem