You can get the amount of CPU time taken, which is different to the amount of time that elapsed. The elapsed time might have been increased by I/O waits etc, whereas the CPU time measures only the amount of time doing actual computation.
I suppose you could just divide the CPU time by the clock cycle time to estimate the number of cycles. Whether that's what you want depends on whether you think things like cache misses - which stall the processor - should count.
JProfiler is the one I used and it certainly does offer to measure CPU time.
Originally posted by Vaishali Gulve:
Is there a JAVA profiler available which gives the number of machine cycles required to process a certain method, instead of just the total time spent on executing a certain method on a certain machine at a certain instant. If yes which one? If no why?
I'm curious what kind of Java application needs such low level info. Of course, one could just be curious.
Or maybe you need to compare performance on machines of different configuration???