public class StreamThroughput
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
protected int |
m_avInstsPerSec |
protected double |
m_cumulativeTime |
protected int |
m_instanceCount |
protected int |
m_numSamples |
protected int |
m_sampleCount |
protected int |
m_sampleTime
sample period over which to count instances processed and instances/sec
throughput
|
protected double |
m_startTime |
protected java.lang.String |
m_statusMessagePrefix |
protected double |
m_updateStart |
| Constructor and Description |
|---|
StreamThroughput(java.lang.String statusMessagePrefix)
Construct a new StreamThroughput
|
StreamThroughput(java.lang.String statusMessagePrefix,
java.lang.String initialMessage,
Logger log)
Construct a new StreamThroughput
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
computeUpdate(double end) |
java.lang.String |
finished()
Register the end of measurement.
|
java.lang.String |
finished(Logger log)
Register the end of measurement.
|
int |
getAverageInstancesPerSecond()
Get the average instances per second
|
void |
setSamplePeriod(int period)
Set the sampling period (in milliseconds) to compute througput over
|
void |
updateEnd(Logger log)
Register a throughput measurement end point.
|
void |
updateStart()
Register a throughput measurement start point
|
protected transient int m_avInstsPerSec
protected transient double m_startTime
protected transient int m_instanceCount
protected transient int m_sampleCount
protected transient java.lang.String m_statusMessagePrefix
protected transient int m_sampleTime
protected transient double m_cumulativeTime
protected transient int m_numSamples
protected transient double m_updateStart
public StreamThroughput(java.lang.String statusMessagePrefix)
statusMessagePrefix - the unique identifier of the Knowledge Flow
component being measured. This enables the correct line in the
status area to be updated. See any Knowledge Flow step for an
example.public StreamThroughput(java.lang.String statusMessagePrefix,
java.lang.String initialMessage,
Logger log)
statusMessagePrefix - the unique identifier of the Knowledge Flow
component being measured. This enables the correct line in the
status area to be updated. See any Knowledge Flow step for an
example.initialMessage - an initial message to print to the status area for
this step on constructionlog - the log to write status updates topublic void setSamplePeriod(int period)
period - the sampling period in millisecondspublic void updateStart()
public void updateEnd(Logger log)
log - the log to write status updates toprotected boolean computeUpdate(double end)
public int getAverageInstancesPerSecond()
public java.lang.String finished(Logger log)
log - the log to write topublic java.lang.String finished()