org.iids.aos.agentserver.java
Class JProf

java.lang.Object
  extended by org.iids.aos.agentserver.java.JProf
Direct Known Subclasses:
LightweightAgentWrapper

public class JProf
extends java.lang.Object


Constructor Summary
JProf()
           
 
Method Summary
static void disable()
           
static long getThreadCpuTime()
          Obtain CPU usage time for current thread.
static boolean isEnabled()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JProf

public JProf()
Method Detail

getThreadCpuTime

public static long getThreadCpuTime()
Obtain CPU usage time for current thread.

Attempts to load the native thread CPU profiling library on the first invocation of this method, but only if the CPU profiling can be loaded at AgentScape startup time (provided a correct library can be found).

Returns:
The number of CPU cycles (milliseconds?) consumed by the current thread or zero if the cpu profiling library was not initialized (i.e. the -Xrunagentcpuprofiler jvm commandline argument was missing.

disable

public static void disable()

isEnabled

public static boolean isEnabled()


Copyright © 2003, 2004 IIDS Group. All Rights Reserved.