|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.java.dev.moskito.core.producers.AbstractStats
net.java.dev.moskito.core.predefined.RequestOrientedStats
public abstract class RequestOrientedStats
This is an abstract class for all request oriented stats.
| Field Summary | |
|---|---|
private StatValue |
currentRequests
Requests in this method / class right now. |
private StatValue |
errors
Errors occured in this method / class and caught by the surrounding stub/skeleton. |
private StatValue |
lastRequest
the last processed request |
private StatValue |
maxCurrentRequests
Max current requests in this method / class. |
private StatValue |
maxTime
Max request time |
private String |
methodName
Name of the method. |
private StatValue |
minTime
Min request time |
private Interval[] |
selectedIntervals
All currently selected intervals. |
private StatValue |
totalRequests
The number of total requests to this method / class. |
private StatValue |
totalTime
The total time spent in this method / class. |
| Constructor Summary | |
|---|---|
RequestOrientedStats()
Creates a new anonymous stats. |
|
RequestOrientedStats(String aMethodName)
Creates a new object with the given method name. |
|
RequestOrientedStats(String aMethodName,
Interval[] aSelectedIntervals)
|
|
| Method Summary | |
|---|---|
void |
addExecutionTime(long time)
Adds messed execution time to the total execution time. |
void |
addRequest()
Notifies about a new request. |
double |
getAverageRequestDuration()
Returns the average time of the request execution duration. |
double |
getAverageRequestDuration(String intervalName)
|
long |
getCurrentRequests()
|
long |
getCurrentRequests(String intervalName)
|
long |
getErrors()
|
long |
getErrors(String intervalName)
|
long |
getLastRequest()
|
long |
getLastRequest(String intervalName)
|
long |
getMaxCurrentRequests()
|
long |
getMaxCurrentRequests(String intervalName)
|
long |
getMaxTime(String intervalName)
|
String |
getMethodName()
|
long |
getMinTime(String intervalName)
|
String |
getName()
This method returns the name of this set of statistical values. |
Interval[] |
getSelectedIntervals()
|
long |
getTotalRequests()
|
long |
getTotalRequests(String intervalName)
|
long |
getTotalTime()
|
long |
getTotalTime(String intervalName)
|
void |
notifyError()
Notifies about an uncaught error. |
void |
notifyRequestFinished()
Notifies that current request leaves the method body. |
void |
setMethodName(String string)
|
void |
setSelectedIntervals(Interval[] selectedIntervals)
|
String |
toStatsString(String intervalName)
This method creates a human-readable textual representation of all statistical values in the given interval. |
String |
toString()
A string representation of this object. |
String |
toString(String intervalName)
|
| Methods inherited from class net.java.dev.moskito.core.producers.AbstractStats |
|---|
createSnapshot, toStatsString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private Interval[] selectedIntervals
private String methodName
private StatValue totalRequests
private StatValue totalTime
private StatValue currentRequests
private StatValue errors
private StatValue maxCurrentRequests
private StatValue lastRequest
private StatValue minTime
private StatValue maxTime
| Constructor Detail |
|---|
public RequestOrientedStats(String aMethodName)
aMethodName - public RequestOrientedStats()
public RequestOrientedStats(String aMethodName,
Interval[] aSelectedIntervals)
| Method Detail |
|---|
public void addRequest()
public void notifyRequestFinished()
public void notifyError()
public void addExecutionTime(long time)
time - public double getAverageRequestDuration()
public double getAverageRequestDuration(String intervalName)
public String toString()
toString in class Objectpublic String toStatsString(String intervalName)
IStats
intervalName - the name of the interval or null for all intervals
public String toString(String intervalName)
public String getMethodName()
public void setMethodName(String string)
string - public long getTotalRequests(String intervalName)
public long getTotalRequests()
public long getTotalTime()
public long getTotalTime(String intervalName)
public long getCurrentRequests(String intervalName)
public long getCurrentRequests()
public long getMaxCurrentRequests(String intervalName)
public long getMaxCurrentRequests()
public long getErrors()
public long getErrors(String intervalName)
public long getLastRequest()
public long getLastRequest(String intervalName)
public Interval[] getSelectedIntervals()
public void setSelectedIntervals(Interval[] selectedIntervals)
public long getMinTime(String intervalName)
public long getMaxTime(String intervalName)
public String getName()
IStats
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||