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 CountDownLatch
completionLatch
protected Long
duration
protected long
interval
protected AtomicBoolean
isRunning
protected org.apache.activemq.tool.sampler.PerformanceEventListener
perfEventListener
protected PerformanceReportWriter
perfReportWriter
protected long
rampDownPercent
protected Long
rampDownTime
protected long
rampUpPercent
protected Long
rampUpTime
protected long
sampleIndex
-
Constructor Summary
Constructors Constructor Description AbstractPerformanceSampler()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
finishSampling()
Long
getDuration()
long
getInterval()
org.apache.activemq.tool.sampler.PerformanceEventListener
getPerfEventListener()
PerformanceReportWriter
getPerfReportWriter()
long
getRampDownPercent()
Long
getRampDownTime()
long
getRampUpPercent()
Long
getRampUpTime()
protected void
onRampDownEnd()
protected void
onRampUpStart()
protected void
onSamplerEnd()
protected void
onSamplerStart()
void
run()
protected void
sample()
abstract void
sampleData()
void
setDuration(long duration)
void
setInterval(long interval)
void
setPerfEventListener(org.apache.activemq.tool.sampler.PerformanceEventListener perfEventListener)
void
setPerfReportWriter(PerformanceReportWriter perfReportWriter)
void
setRampDownPercent(long rampDownPercent)
void
setRampDownTime(long rampDownTime)
void
setRampUpPercent(long rampUpPercent)
void
setRampUpTime(long rampUpTime)
void
startSampler(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:
getRampUpTime
in interfacePerformanceSampler
-
setRampUpTime
public void setRampUpTime(long rampUpTime)
- Specified by:
setRampUpTime
in interfacePerformanceSampler
-
getRampDownTime
public Long getRampDownTime()
- Specified by:
getRampDownTime
in interfacePerformanceSampler
-
setRampDownTime
public void setRampDownTime(long rampDownTime)
- Specified by:
setRampDownTime
in interfacePerformanceSampler
-
getDuration
public Long getDuration()
- Specified by:
getDuration
in interfacePerformanceSampler
-
setDuration
public void setDuration(long duration)
- Specified by:
setDuration
in interfacePerformanceSampler
-
getInterval
public long getInterval()
- Specified by:
getInterval
in interfacePerformanceSampler
-
setInterval
public void setInterval(long interval)
- Specified by:
setInterval
in interfacePerformanceSampler
-
getRampUpPercent
public long getRampUpPercent()
- Specified by:
getRampUpPercent
in interfacePerformanceSampler
-
setRampUpPercent
public void setRampUpPercent(long rampUpPercent)
- Specified by:
setRampUpPercent
in interfacePerformanceSampler
-
getRampDownPercent
public long getRampDownPercent()
- Specified by:
getRampDownPercent
in interfacePerformanceSampler
-
setRampDownPercent
public void setRampDownPercent(long rampDownPercent)
- Specified by:
setRampDownPercent
in interfacePerformanceSampler
-
getPerfReportWriter
public PerformanceReportWriter getPerfReportWriter()
- Specified by:
getPerfReportWriter
in interfacePerformanceSampler
-
setPerfReportWriter
public void setPerfReportWriter(PerformanceReportWriter perfReportWriter)
- Specified by:
setPerfReportWriter
in interfacePerformanceSampler
-
getPerfEventListener
public org.apache.activemq.tool.sampler.PerformanceEventListener getPerfEventListener()
- Specified by:
getPerfEventListener
in interfacePerformanceSampler
-
setPerfEventListener
public void setPerfEventListener(org.apache.activemq.tool.sampler.PerformanceEventListener perfEventListener)
- Specified by:
setPerfEventListener
in interfacePerformanceSampler
-
startSampler
public void startSampler(CountDownLatch completionLatch, ClientRunBasis clientRunBasis, long clientRunDuration)
- Specified by:
startSampler
in interfacePerformanceSampler
-
finishSampling
public void finishSampling()
- Specified by:
finishSampling
in interfacePerformanceSampler
-
sample
protected void sample()
-
sampleData
public abstract void sampleData()
- Specified by:
sampleData
in interfacePerformanceSampler
-
onRampUpStart
protected void onRampUpStart()
-
onSamplerStart
protected void onSamplerStart()
-
onSamplerEnd
protected void onSamplerEnd()
-
onRampDownEnd
protected void onRampDownEnd()
-
-