|
DRCL J-Sim API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectdrcl.DrclObj
drcl.comp.Component
drcl.comp.Extension
drcl.comp.tool.CountMonitor2
This component monitors an "object stream" (defined by
Countable)
and outputs its average rate and object loss rate.
This component works the same as CountMonitor except that it also
calculates object loss rate in the current time window, provided that the
objects contain correct "sequence" information as defined in
Countable.
It calculates the loss rate by summing up the "gaps" found between the
ordering information in the objects in the current time window.
The calculation may not be correct if objects may arrive out
of order in different windows.
Same as CountMonitor, this component is configured by two
parameters: the window size (default one second) and the output interval
(default 0.5 second).
It can operate in the "size" mode, the "object" mode, or both.
The throughput events are exported at either the sizecount@
port or the objcount@ port, and the loss rate exported at either
the sizeloss@ port or the objloss@ port, both in
percentage(%).
| Nested Class Summary |
| Nested classes inherited from class drcl.comp.Component |
Component.Locks |
| Field Summary | |
static java.lang.String |
OBJ_COUNT_PORT_ID
ID of the port to export the object-mode throughput events. |
static java.lang.String |
OBJ_LOSS_PORT_ID
ID of the port to export the object-mode object-loss-rate events. |
static java.lang.String |
SIZE_COUNT_PORT_ID
ID of the port to export the size-mode throughput events. |
static java.lang.String |
SIZE_LOSS_PORT_ID
ID of the port to export the size-mode object-loss-rate events. |
| Constructor Summary | |
CountMonitor2()
|
|
CountMonitor2(java.lang.String id_)
|
|
| Method Summary | |
void |
configure(double wsize_,
double uint_)
Configures this traffic monitor. |
void |
duplicate(java.lang.Object source_)
Duplicates the content of source_, including ID, name, child components and connections among them, to this component. |
double |
getOutputInterval()
Returns the output interval (in second). |
double |
getWindowSize()
Returns the size of the measurement window (in second). |
java.lang.String |
info()
Returns information regarding this component. |
boolean |
isObjModeEnabled()
Returns true if the "object" mode is enabled. |
boolean |
isSizeModeEnabled()
Returns true if the "size" mode is enabled. |
void |
reset()
Resets the component for being used anew. |
void |
setEventNames(java.lang.String objCountEvent_,
java.lang.String objLossEvent_,
java.lang.String sizeCountEvent_,
java.lang.String sizeLossEvent_)
Sets the event names to be outputted with the report events. |
void |
setObjectEventNames(java.lang.String objCountEvent_,
java.lang.String objLossEvent_)
Sets the "object" event names to be outputted with the report events. |
void |
setObjModeEnabled(boolean enabled_)
Enables/disables the "object" mode. |
void |
setOutputInterval(double int_)
Sets the output interval (in second). |
void |
setSizeEventNames(java.lang.String sizeCountEvent_,
java.lang.String sizeLossEvent_)
Sets the "size" event names to be outputted with the report events. |
void |
setSizeModeEnabled(boolean enabled_)
Enables/disables the "size" mode. |
void |
setWindowSize(double size_)
Sets the size of the measurement window (in second). |
| Methods inherited from class drcl.comp.Extension |
isExtensionEnabled, setExtensionEnabled |
| Methods inherited from class drcl.DrclObj |
clone |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String OBJ_COUNT_PORT_ID
public static final java.lang.String OBJ_LOSS_PORT_ID
public static final java.lang.String SIZE_COUNT_PORT_ID
public static final java.lang.String SIZE_LOSS_PORT_ID
| Constructor Detail |
public CountMonitor2()
public CountMonitor2(java.lang.String id_)
| Method Detail |
public void reset()
Component
reset in class Componentpublic void duplicate(java.lang.Object source_)
Component
duplicate in interface ObjectDuplicableduplicate in class Componentpublic java.lang.String info()
Component
info in class Component
public void configure(double wsize_,
double uint_)
wsize_ - the window size in second.uint_ - the output interval in second.
public void setEventNames(java.lang.String objCountEvent_,
java.lang.String objLossEvent_,
java.lang.String sizeCountEvent_,
java.lang.String sizeLossEvent_)
public void setObjectEventNames(java.lang.String objCountEvent_,
java.lang.String objLossEvent_)
public void setSizeEventNames(java.lang.String sizeCountEvent_,
java.lang.String sizeLossEvent_)
public void setOutputInterval(double int_)
public double getOutputInterval()
public void setWindowSize(double size_)
public double getWindowSize()
public void setObjModeEnabled(boolean enabled_)
public boolean isObjModeEnabled()
public void setSizeModeEnabled(boolean enabled_)
public boolean isSizeModeEnabled()
|
DRCL J-Sim API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||