Package org.apache.activemq.tool.sampler
Class AbstractPerformanceSampler
- java.lang.Object
-
- org.apache.activemq.tool.properties.AbstractObjectProperties
-
- org.apache.activemq.tool.sampler.AbstractPerformanceSampler
-
- All Implemented Interfaces:
Runnable,ReflectionConfigurable,PerformanceSampler
- Direct Known Subclasses:
CpuSamplerTask,ThroughputSamplerTask
public abstract class AbstractPerformanceSampler extends AbstractObjectProperties implements PerformanceSampler
-
-
Field Summary
Fields Modifier and Type Field Description protected CountDownLatchcompletionLatchprotected Longdurationprotected longintervalprotected AtomicBooleanisRunningprotected org.apache.activemq.tool.sampler.PerformanceEventListenerperfEventListenerprotected PerformanceReportWriterperfReportWriterprotected longrampDownPercentprotected LongrampDownTimeprotected longrampUpPercentprotected LongrampUpTimeprotected longsampleIndex
-
Constructor Summary
Constructors Constructor Description AbstractPerformanceSampler()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidfinishSampling()LonggetDuration()longgetInterval()org.apache.activemq.tool.sampler.PerformanceEventListenergetPerfEventListener()PerformanceReportWritergetPerfReportWriter()longgetRampDownPercent()LonggetRampDownTime()longgetRampUpPercent()LonggetRampUpTime()protected voidonRampDownEnd()protected voidonRampUpStart()protected voidonSamplerEnd()protected voidonSamplerStart()voidrun()protected voidsample()abstract voidsampleData()voidsetDuration(long duration)voidsetInterval(long interval)voidsetPerfEventListener(org.apache.activemq.tool.sampler.PerformanceEventListener perfEventListener)voidsetPerfReportWriter(PerformanceReportWriter perfReportWriter)voidsetRampDownPercent(long rampDownPercent)voidsetRampDownTime(long rampDownTime)voidsetRampUpPercent(long rampUpPercent)voidsetRampUpTime(long rampUpTime)voidstartSampler(CountDownLatch completionLatch, ClientRunBasis clientRunBasis, long clientRunDuration)-
Methods inherited from class org.apache.activemq.tool.properties.AbstractObjectProperties
acceptConfig, configureProperties, retrieveProperties
-
-
-
-
Field Detail
-
rampUpPercent
protected long rampUpPercent
-
rampDownPercent
protected long rampDownPercent
-
rampUpTime
protected Long rampUpTime
-
rampDownTime
protected Long rampDownTime
-
duration
protected Long duration
-
interval
protected long interval
-
perfReportWriter
protected PerformanceReportWriter perfReportWriter
-
perfEventListener
protected org.apache.activemq.tool.sampler.PerformanceEventListener perfEventListener
-
isRunning
protected final AtomicBoolean isRunning
-
completionLatch
protected CountDownLatch completionLatch
-
sampleIndex
protected long sampleIndex
-
-
Method Detail
-
getRampUpTime
public Long getRampUpTime()
- Specified by:
getRampUpTimein interfacePerformanceSampler
-
setRampUpTime
public void setRampUpTime(long rampUpTime)
- Specified by:
setRampUpTimein interfacePerformanceSampler
-
getRampDownTime
public Long getRampDownTime()
- Specified by:
getRampDownTimein interfacePerformanceSampler
-
setRampDownTime
public void setRampDownTime(long rampDownTime)
- Specified by:
setRampDownTimein interfacePerformanceSampler
-
getDuration
public Long getDuration()
- Specified by:
getDurationin interfacePerformanceSampler
-
setDuration
public void setDuration(long duration)
- Specified by:
setDurationin interfacePerformanceSampler
-
getInterval
public long getInterval()
- Specified by:
getIntervalin interfacePerformanceSampler
-
setInterval
public void setInterval(long interval)
- Specified by:
setIntervalin interfacePerformanceSampler
-
getRampUpPercent
public long getRampUpPercent()
- Specified by:
getRampUpPercentin interfacePerformanceSampler
-
setRampUpPercent
public void setRampUpPercent(long rampUpPercent)
- Specified by:
setRampUpPercentin interfacePerformanceSampler
-
getRampDownPercent
public long getRampDownPercent()
- Specified by:
getRampDownPercentin interfacePerformanceSampler
-
setRampDownPercent
public void setRampDownPercent(long rampDownPercent)
- Specified by:
setRampDownPercentin interfacePerformanceSampler
-
getPerfReportWriter
public PerformanceReportWriter getPerfReportWriter()
- Specified by:
getPerfReportWriterin interfacePerformanceSampler
-
setPerfReportWriter
public void setPerfReportWriter(PerformanceReportWriter perfReportWriter)
- Specified by:
setPerfReportWriterin interfacePerformanceSampler
-
getPerfEventListener
public org.apache.activemq.tool.sampler.PerformanceEventListener getPerfEventListener()
- Specified by:
getPerfEventListenerin interfacePerformanceSampler
-
setPerfEventListener
public void setPerfEventListener(org.apache.activemq.tool.sampler.PerformanceEventListener perfEventListener)
- Specified by:
setPerfEventListenerin interfacePerformanceSampler
-
startSampler
public void startSampler(CountDownLatch completionLatch, ClientRunBasis clientRunBasis, long clientRunDuration)
- Specified by:
startSamplerin interfacePerformanceSampler
-
finishSampling
public void finishSampling()
- Specified by:
finishSamplingin interfacePerformanceSampler
-
sample
protected void sample()
-
sampleData
public abstract void sampleData()
- Specified by:
sampleDatain interfacePerformanceSampler
-
onRampUpStart
protected void onRampUpStart()
-
onSamplerStart
protected void onSamplerStart()
-
onSamplerEnd
protected void onSamplerEnd()
-
onRampDownEnd
protected void onRampDownEnd()
-
-