com.caucho.health.action
Class StartProfiler

java.lang.Object
  extended by com.caucho.health.action.AbstractHealthAction
      extended by com.caucho.health.action.StartProfiler
All Implemented Interfaces:
HealthAction

@Singleton
@Configurable
public class StartProfiler
extends AbstractHealthAction

Health action to start a profiler session. Results are logged to the the internal log database and the resin log file at INFO level.

<health:ActionSequence>
   <health:FailSafeRestart timeout="10m">
   <health:DumpThreads/>
   <health:DumpHeap/>
   <health:StartProfiler active-time="5m"/>
   <health:Restart/>
   
   <health:IfHealthCritical time="5m"/>
 </health:ActionSequence>
 


Nested Class Summary
protected  class StartProfiler.ProfilerTask
           
 
Field Summary
static java.lang.String LOG_TYPE
           
 
Constructor Summary
StartProfiler()
           
 
Method Summary
 void doActionImpl(HealthEvent healthEvent)
           
 long getActiveTime()
           
 int getDepth()
           
 long getSamplingRate()
           
 void init()
           
 java.lang.String jsonProfile()
           
 void setActiveTime(Period activeTime)
           
 void setActiveTimeMillis(long activeTime)
           
 void setDepth(int depth)
           
 void setSamplingRate(Period samplingRate)
           
 void setSamplingRateMillis(long samplingRate)
           
 void setWait(boolean isWait)
           
 void startProfile()
           
 void stop()
           
 
Methods inherited from class com.caucho.health.action.AbstractHealthAction
add, addListener, doAction, getPredicates, start, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LOG_TYPE

public static final java.lang.String LOG_TYPE
See Also:
Constant Field Values
Constructor Detail

StartProfiler

public StartProfiler()
Method Detail

init

@PostConstruct
public void init()
Overrides:
init in class AbstractHealthAction

getActiveTime

public long getActiveTime()

setActiveTime

@Configurable
public void setActiveTime(Period activeTime)

setActiveTimeMillis

@Configurable
public void setActiveTimeMillis(long activeTime)

getSamplingRate

public long getSamplingRate()

setWait

public void setWait(boolean isWait)

setSamplingRate

@Configurable
public void setSamplingRate(Period samplingRate)

setSamplingRateMillis

@Configurable
public void setSamplingRateMillis(long samplingRate)

getDepth

public int getDepth()

setDepth

@Configurable
public void setDepth(int depth)

doActionImpl

public void doActionImpl(HealthEvent healthEvent)
Specified by:
doActionImpl in class AbstractHealthAction

startProfile

public void startProfile()

stop

public void stop()
Specified by:
stop in interface HealthAction
Overrides:
stop in class AbstractHealthAction

jsonProfile

public java.lang.String jsonProfile()