Apart from 'typeperf' -- which is not available in other Windows versions(one has to download from web with possible non-working version of typeperf.exe in another windows version), one can use 'pslist.exe' from
http://www.sysinternals.com. pslist.exe is available in
http://www.sysinternals.com/Utilities/PsTools.html. pslist will also be useful for one to see which
thread is taking more time(OR doing tight loops in a JVM).
If you JDK 1.5 onwards, pure java code without resorting to Runtime.exec ( which is costly) using JMX package java.lang.management. The JMX-bean/classes you are interested are:
* ThreadInfo
* ThreadMBean
[ March 24, 2006: Message edited by: Mahadevan Gorti SS ]