public interface IPerformanceStats<T extends IEventTypeEnumerator>
Modifier and Type | Method and Description |
---|---|
void |
closeAllParentContext()
Close all the context in
contextStackCall list and remove them from the list. |
void |
closeAndLogContext(java.lang.String context)
Close a context using name provided in argument and remove it from
contextStackCall list. |
void |
closeAndLogContext(java.lang.String context,
java.lang.Object blame)
Close a context using name provided in argument and remove it from
contextStackCall list. |
void |
closeAndLogCurrentContext()
Close the last context in
contextStackCall list and remove it from the list. |
void |
closeContext(java.lang.String context)
Close a context using name provided in argument and remove it from
context stack call list. |
boolean |
contextRunningTimeExceedTimeOut(java.lang.String context,
long timeOut)
Check if the running time for the context provided in argument exceed the timeout value provide in argument.
|
void |
endEvent(T enumerator,
java.lang.Object blameObject)
Stop the running time for the event referenced by the ID and the blame object under the current opened context .
|
void |
endEvent(T enumerator,
java.lang.Object blameObject,
java.lang.String context)
Stop the running time for the event referenced by the ID and the blame object under the provided context.
|
java.util.Collection<java.lang.String> |
getContextNames()
Return a list of all the context declared in the base.
|
long |
getContextRunningTime(java.lang.String context)
Return the context running time in millisecond.
|
StatsEvent |
getEventStat(T enumerator,
java.lang.Object blameObject,
java.lang.String context)
Return the
StatsEvent referenced by the ID and the blame object under the provided context. |
java.util.Map<java.lang.Integer,StatsEvent> |
getEventStats(T enumerator,
java.lang.String context)
Return all the
StatsEvent of this ID under the provided context. |
java.util.List<StatsEvent> |
getEventsTimeFailure()
Return a list of all the events triggered under any of the contexts,that are in time failure state.
|
java.util.List<StatsEvent> |
getTimeFailureEventsInContext(java.lang.String context)
Return a list of all the events under that context that are in time failure state.
|
boolean |
isContextEventsTimeFailure(java.lang.String context)
Check if there are events triggered under the context,that are in time failure state.
|
boolean |
isEnabled()
Return activation status for performanceStats framework.
|
boolean |
isEventsTimeFailure()
Check if there are events triggered under any of the contexts,that are in time failure state.
|
boolean |
isEventTimeFail(T enumerator,
java.lang.Object blameObject)
Test if an event triggered under default context has a running time exceeding timeout value defined in .option
file.
|
boolean |
isEventTimeFail(T enumerator,
java.lang.Object blameObject,
java.lang.String context)
Test if an event triggered under context has a running time exceeding timeout value defined in .option file.
|
boolean |
isEventTriggered() |
boolean |
isRegisteredContext(java.lang.String context)
Check if the context provided in argument has been declared and used.
|
int |
numberOfContextEventsTimeFailure(java.lang.String context)
Return the number of events triggered under the context,that are in time failure state.
|
int |
numberOfEventsTimeFailure(java.lang.String context)
Return the number of events triggered under any of the contexts,that are in time failure state.
|
void |
openContext(java.lang.String context)
Open a context using name provided in argument, and add it to the top of
contextStackCall
list. |
void |
openContext(java.lang.String context,
java.lang.Object blame)
Open a context using name provided in argument, and add it to the top of
contextStackCall
list. |
boolean |
openContextIfFirstOne(java.lang.String context) |
java.lang.String |
printAllStats()
Provided a string representing all data stored in the base.
|
java.lang.String |
printContextStats(java.lang.String context)
Provided a string representing all data stored in the base for one context.
|
java.lang.String |
printContextsTree()
Provided a string representing the tree architecture for all the contexts.
|
java.lang.String |
printContextTree(java.lang.String context)
Provided a string representing the tree architecture for one context.
|
java.lang.String |
printEventStat(T enumerator,
java.lang.Object blameObject,
java.lang.String context)
Provided a string representing data stored in the base for one event.
|
java.lang.String |
printEventStats(T enumerator,
java.lang.String context)
Provided a string representing data stored in the base for one ID type of event under a given context.
|
void |
removeAllStats()
Remove all contexts and events stored in the data base.
|
void |
removeContext(java.lang.String context)
Remove a context from the data base and all the events stored under that context.
|
void |
removeStat(T enumerator,
java.lang.Object blameObject,
java.lang.String context)
Remove a
StatsEvent object from the data base. |
void |
removeStatsForContext(java.lang.String context)
Remove all the events stored under that context from the data base.
|
void |
removeStatsForEvent(T enumerator,
java.lang.String context)
Remove all the events of one given ID stored under that context from the data base.
|
void |
startEvent(T enumerator,
java.lang.Object blameObject)
Start an event under the current opened context (default context if no context is opened).If an event with the
same ID and the same blame object has been previously triggered, the running time for this declaration
will be added to the current running time value and runCount parameter will be incremented.
|
void |
startEvent(T enumerator,
java.lang.Object blameObject,
java.lang.String context)
Start an event under the provided context (default context if the context is not opened).If an event with the
same ID and the same blame object has been previously triggered, the running time for this declaration
will be added to the current running time value and runCount parameter will be incremented.
|
void |
startNewEvent(T enumerator,
java.lang.Object blameObject)
Start a new event under the current opened context (default context if no context is opened).If an event with the
same ID and the same blame object has been previously triggered it will be replaced.
|
void |
startNewEvent(T enumerator,
java.lang.Object blameObject,
java.lang.String context)
Start a new event under the provided context (default context if the context is not opened).If an event with the
same ID and the same blame object has been previously triggered it will be replaced.
|
boolean isEnabled()
boolean isEventTriggered()
boolean openContextIfFirstOne(java.lang.String context)
void openContext(java.lang.String context, java.lang.Object blame)
contextStackCall
list. If context is open for the first time a new one is created and added. All the events triggered after the
call to openContext(String context)
and before a call to
closeContext(String context)
or closeCurrentContext()
will be included in
this context.context
- the name of the context to open. This must not be null.void openContext(java.lang.String context)
contextStackCall
list. If context is open for the first time a new one is created and added. All the events triggered after the
call to openContext(String context)
and before a call to
closeContext(String context)
or closeCurrentContext()
will be included in
this context.context
- the name of the context to open. This must not be null.void closeAndLogContext(java.lang.String context, java.lang.Object blame)
contextStackCall
list. In
runTime mode context description is logged after context is closed. If the option
org.eclipse.sphinx.platform/perf/jUnitOptions/resetEventBase in .option file is set
true
all the events included in this context are removed from the base after logging.context
- the name of the context to close. This must not be null.void closeAndLogContext(java.lang.String context)
contextStackCall
list. In
runTime mode context description is logged after context is closed. If the option
org.eclipse.sphinx.platform/perf/jUnitOptions/resetEventBase in .option file is set
true
all the events included in this context are removed from the base after logging.context
- the name of the context to close. This must not be null.void closeAndLogCurrentContext()
contextStackCall
list and remove it from the list. In runTime mode
context description is logged after context is closed. If the option
org.eclipse.sphinx.platform/perf/jUnitOptions/resetEventBase in .option file is set
true
all the events included in this context are removed from the base after logging.void closeAllParentContext()
contextStackCall
list and remove them from the list. In runTime mode
context description of the first context in the list (the parent context)is logged. If the option
org.eclipse.sphinx.platform/perf/jUnitOptions/resetEventBase in .option file is set
true
all the events included in this context are removed from the base after logging.void closeContext(java.lang.String context)
context stack call
list.
All the events triggered after this call to the close method will be included in the previous opened context. If
there is no more opened context events are added to default context Global.context
- the name of the context to close. This must not be null.void removeStat(T enumerator, java.lang.Object blameObject, java.lang.String context)
StatsEvent
object from the data base.enumerator
- The ID of the event.Must be an enumerator provided by the enum declared in the concrete class of
AbstractPerformanceStats
.blameObject
- An object responsible for the event.Can be a simple string. Must not be null.context
- the context where the event has been triggered.void removeContext(java.lang.String context)
context
- the name of the context to remove.void removeStatsForContext(java.lang.String context)
context
- the name of the context.void removeStatsForEvent(T enumerator, java.lang.String context)
enumerator
- The ID of the event.Must be an enumerator provided by the enum declared in the concrete class of
AbstractPerformanceStats
.context
- the name of the context.void removeAllStats()
boolean isEventTimeFail(T enumerator, java.lang.Object blameObject)
enumerator
- The ID of the event.Must be an enumerator provided by the enum declared in the concrete class of
AbstractPerformanceStats
.blameObject
- An object responsible for the event.Can be a simple string. Must not be null.boolean isEventTimeFail(T enumerator, java.lang.Object blameObject, java.lang.String context)
enumerator
- The ID of the event.Must be an enumerator provided by the enum declared in the concrete class of
AbstractPerformanceStats
.blameObject
- An object responsible for the event.Can be a simple string. Must not be null.context
- the name of the context.void startNewEvent(T enumerator, java.lang.Object blameObject)
enumerator
- The ID of the event.Must be an enumerator provided by the enum declared in the concrete class of
AbstractPerformanceStats
.blameObject
- An object responsible for the event.Can be a simple string. Must not be null.void startEvent(T enumerator, java.lang.Object blameObject)
enumerator
- The ID of the event.Must be an enumerator provided by the enum declared in the concrete class of
AbstractPerformanceStats
.blameObject
- An object responsible for the event.Can be a simple string. Must not be null.void startNewEvent(T enumerator, java.lang.Object blameObject, java.lang.String context)
enumerator
- The ID of the event.Must be an enumerator provided by the enum declared in the concrete class of
AbstractPerformanceStats
.blameObject
- An object responsible for the event.Can be a simple string. Must not be null.void startEvent(T enumerator, java.lang.Object blameObject, java.lang.String context)
enumerator
- The ID of the event.Must be an enumerator provided by the enum declared in the concrete class of
AbstractPerformanceStats
.blameObject
- An object responsible for the event.Can be a simple string. Must not be null.void endEvent(T enumerator, java.lang.Object blameObject)
enumerator
- The ID of the event.Must be an enumerator provided by the enum declared in the concrete class of
AbstractPerformanceStats
.blameObject
- An object responsible for the event.Can be a simple string. Must not be null.void endEvent(T enumerator, java.lang.Object blameObject, java.lang.String context)
enumerator
- The ID of the event.Must be an enumerator provided by the enum declared in the concrete class of
AbstractPerformanceStats
.blameObject
- An object responsible for the event.Can be a simple string. Must not be null.context
- the name of the context containing the event.StatsEvent getEventStat(T enumerator, java.lang.Object blameObject, java.lang.String context)
StatsEvent
referenced by the ID and the blame object under the provided context.enumerator
- The ID of the event.Must be an enumerator provided by the enum declared in the concrete class of
AbstractPerformanceStats
.blameObject
- An object responsible for the event.Can be a simple string. Must not be null.context
- the name of the context containing the event.StatsEvent
java.util.Map<java.lang.Integer,StatsEvent> getEventStats(T enumerator, java.lang.String context)
StatsEvent
of this ID under the provided context.enumerator
- The ID of the event.Must be an enumerator provided by the enum declared in the concrete class of
AbstractPerformanceStats
.context
- the name of the context containing the event.java.util.Collection<java.lang.String> getContextNames()
boolean contextRunningTimeExceedTimeOut(java.lang.String context, long timeOut)
context
- the name of the context.timeOut
- timeout value in millisecond.true
if context has been declared false
otherwise.boolean isRegisteredContext(java.lang.String context)
context
- the name of the context.true
if context has been declared false
otherwise.long getContextRunningTime(java.lang.String context)
context
- the name of the context.java.util.List<StatsEvent> getTimeFailureEventsInContext(java.lang.String context)
context
- the name of the context.boolean isEventsTimeFailure()
true
if at least one of all the events triggered is in time failure state.int numberOfEventsTimeFailure(java.lang.String context)
java.util.List<StatsEvent> getEventsTimeFailure()
boolean isContextEventsTimeFailure(java.lang.String context)
context
- the name of the context.true
if at least one of all the events triggered under this context is in time failure
state.int numberOfContextEventsTimeFailure(java.lang.String context)
context
- the name of the context.java.lang.String printContextTree(java.lang.String context)
context
- the name of the context.java.lang.String printContextsTree()
java.lang.String printAllStats()
java.lang.String printContextStats(java.lang.String context)
context
- the name of the context.java.lang.String printEventStat(T enumerator, java.lang.Object blameObject, java.lang.String context)
enumerator
- The ID of the event.Must be an enumerator provided by the enum declared in the concrete class of
AbstractPerformanceStats
.blameObject
- An object responsible for the event.Can be a simple string. Must not be null.context
- the name of the context containing the event.java.lang.String printEventStats(T enumerator, java.lang.String context)
enumerator
- The ID of the event.Must be an enumerator provided by the enum declared in the concrete class of
AbstractPerformanceStats
.context
- the name of the context containing the event.