Recommended: Sing it, brah! 5 fabulous songs for developers
JW's Top 5
Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs
Page 2 of 2
duration = 0.004 ms duration = 0.006 ms duration = 0.005 ms duration = 0.004 ms duration = 0.004 ms
Even with added Java and JNI method dispatch overhead, you can count on sub-10 microsecond resolution on a good system. This is orders of magnitude better than any other profiling options I've tried. As mentioned in Resources (Java Tip 92), commercial analysis tools based on the Java Virtual Machine Profiler Interface (JVMPI) won't beat the directness and simplicity of my approach, since the relevant JVMPI profiling methods are based on the same low-resolution system timer calls and require additional analysis to extrapolate measured data correctly.
I hope you find this article and the implementation code (downloadable in Resources) useful in your own work. I have been using it for several years when profiling general-purpose Java code, Java Database Connectivity queries, Java file and socket input/output, HTTP and Remote Method Invocation method call overhead, and many other code segments not quite "slow enough" to work well with the default system timer and when the full machinery of commercial profiling tools is an overkill.