|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.floodlightcontroller.perfmon.PktInProcessingTime
public class PktInProcessingTime
This class contains a set of buckets (called time buckets as the primarily contain 'times' that are used in a circular way to store information on packet in processing time. Each bucket is meant to store the various processing time related data for a fixed duration. Buckets are reused to reduce garbage generation! Once the last bucket is used up the LRU bucket is reused. Naming convention for variable or constants variable_s : value in seconds variable_ms: value in milliseconds variable_us: value in microseconds variable_ns: value in nanoseconds Key Constants: ONE_BUCKET_DURATION_SECONDS_INT: time duration of each bucket BUCKET_SET_SIZE: Number of buckets TOT_PROC_TIME_WARN_THRESHOLD_US: if processing time for a packet exceeds this threshold then a warning LOG message is generated TOT_PROC_TIME_ALERT_THRESHOLD_US: same as above but an alert level syslog is generated instead
| Field Summary | |
|---|---|
static java.lang.String |
COLUMN_ID
|
static java.lang.String |
COLUMN_PERF_MON
|
protected static java.lang.String |
ControllerTableName
|
protected IFloodlightProviderService |
floodlightProvider
|
protected boolean |
isEnabled
|
protected boolean |
isInited
|
protected long |
lastPktTime_ns
|
protected static org.slf4j.Logger |
logger
|
protected static long |
ONE_BUCKET_DURATION_NANOSECONDS
|
protected static int |
ONE_BUCKET_DURATION_SECONDS
BUCKET_SET_SIZE buckets each holding 10s of processing time data, a total of 30*10s = 5mins of processing time data is maintained |
protected long |
ptWarningThresholdInNano
|
| Constructor Summary | |
|---|---|
PktInProcessingTime()
|
|
| Method Summary | |
|---|---|
void |
bootstrap(java.util.List<IOFMessageListener> listeners)
Creates time buckets for a set of modules to measure their performance |
CumulativeTimeBucket |
getCtb()
|
java.util.Collection<java.lang.Class<? extends IFloodlightService>> |
getModuleDependencies()
Get a list of Modules that this module depends on. |
java.util.Collection<java.lang.Class<? extends IFloodlightService>> |
getModuleServices()
Return the list of interfaces that this module implements. |
java.util.Map<java.lang.Class<? extends IFloodlightService>,IFloodlightService> |
getServiceImpls()
Instantiate (as needed) and return objects that implement each of the services exported by this module. |
void |
init(FloodlightModuleContext context)
This is a hook for each module to do its internal initialization, e.g., call setService(context.getService("Service")) All module dependencies are resolved when this is called, but not every module is initialized. |
boolean |
isEnabled()
|
void |
recordEndTimeComp(IOFMessageListener listener)
|
void |
recordEndTimePktIn(IOFSwitch sw,
OFMessage m,
FloodlightContext cntx)
|
void |
recordStartTimeComp(IOFMessageListener listener)
Stores a timestamp in ns. |
void |
recordStartTimePktIn()
|
void |
setEnabled(boolean enabled)
|
void |
startUp(FloodlightModuleContext context)
This is a hook for each module to do its external initializations, e.g., register for callbacks or query for state in other modules It is expected that this function will not block and that modules that want non-event driven CPU will spawn their own threads. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected IFloodlightProviderService floodlightProvider
protected long ptWarningThresholdInNano
protected static final java.lang.String ControllerTableName
public static final java.lang.String COLUMN_ID
public static final java.lang.String COLUMN_PERF_MON
protected static org.slf4j.Logger logger
protected boolean isEnabled
protected boolean isInited
protected long lastPktTime_ns
protected static final int ONE_BUCKET_DURATION_SECONDS
protected static final long ONE_BUCKET_DURATION_NANOSECONDS
| Constructor Detail |
|---|
public PktInProcessingTime()
| Method Detail |
|---|
public void bootstrap(java.util.List<IOFMessageListener> listeners)
IPktInProcessingTimeService
bootstrap in interface IPktInProcessingTimeServicelisteners - The message listeners to create time buckets forpublic boolean isEnabled()
isEnabled in interface IPktInProcessingTimeServicepublic void setEnabled(boolean enabled)
setEnabled in interface IPktInProcessingTimeServicepublic CumulativeTimeBucket getCtb()
getCtb in interface IPktInProcessingTimeServicepublic void recordStartTimeComp(IOFMessageListener listener)
IPktInProcessingTimeService
recordStartTimeComp in interface IPktInProcessingTimeServicepublic void recordEndTimeComp(IOFMessageListener listener)
recordEndTimeComp in interface IPktInProcessingTimeServicepublic void recordStartTimePktIn()
recordStartTimePktIn in interface IPktInProcessingTimeService
public void recordEndTimePktIn(IOFSwitch sw,
OFMessage m,
FloodlightContext cntx)
recordEndTimePktIn in interface IPktInProcessingTimeServicepublic java.util.Collection<java.lang.Class<? extends IFloodlightService>> getModuleServices()
IFloodlightModule
getModuleServices in interface IFloodlightModulepublic java.util.Map<java.lang.Class<? extends IFloodlightService>,IFloodlightService> getServiceImpls()
IFloodlightModule
getServiceImpls in interface IFloodlightModulepublic java.util.Collection<java.lang.Class<? extends IFloodlightService>> getModuleDependencies()
IFloodlightModule
getModuleDependencies in interface IFloodlightModule
public void init(FloodlightModuleContext context)
throws FloodlightModuleException
IFloodlightModule
init in interface IFloodlightModuleFloodlightModuleExceptionpublic void startUp(FloodlightModuleContext context)
IFloodlightModule
startUp in interface IFloodlightModule
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||