I have a CPU intensive multi-threaded Java application and I'm looking for ways to measure its performance at run time (useful for automation). I tried a few options
System.currentTimeMillis();
System.nanoTime();
ThreadMXBean.getThreadCPUTime();
The first two measure real time. The last measures CPU time for only one thread. I want to measure the CPU-time for all threads spawned by the process.
Before resurrecting an old machine and dedicate it for this task, I would like to see what options I have now.
I run Linux and a platform dependent solution is acceptable, but least desirable.
Try perf4j: http://perf4j.codehaus.org/ I recommend using it along with AOP, but it's not a must. See http://perf4j.codehaus.org/devguide.html#Using_Spring_AOP_to_Integrate_Timing_Aspects for more details on AOP.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With