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.