Methods Summary |
---|
void | calculateResponseTimes(long curRespTime)
if ( curRespTime > maxResponseTime) {
maxResponseTime = curRespTime;
}
if (minResponseTime < 0 ) {
minResponseTime = curRespTime;
} else if ( curRespTime < minResponseTime) {
minResponseTime = curRespTime;
}
totalResponseTime += curRespTime;
|
public void | cleanup()
enterTime = 0;
cHost = cUser = null;
|
public long | getAverageResponseTime()
int totalInv = totalSuccess + totalFaults;
if (totalInv == 0 ) {
return (long)0;
} else {
return totalResponseTime/ (totalInv);
}
|
public java.lang.String | getClientHost()
return clientHost;
|
public java.lang.String | getClientUser()
return clientUser;
|
public java.lang.String | getFaultActor()
return faultActor;
|
public java.lang.String | getFaultCode()
return faultCode;
|
public java.lang.String | getFaultString()
return faultString;
|
public long | getLastResetTime()
return resetTime;
|
public long | getMaxResponseTime()
return maxResponseTime;
|
public long | getMinResponseTime()
if (minResponseTime < 0 ) {
return 0;
} else {
return minResponseTime;
}
|
public int | getRequestSize()
return requestSize;
|
public int | getResponseSize()
return responseSize;
|
public long | getResponseTime()
return responseTime;
|
public double | getThroughput()
long avgRespTime = getAverageResponseTime();
double dValue = avgRespTime;
if ( avgRespTime == 0 ) {
return 0;
} else {
return 1000/dValue;
}
|
public int | getTotalAuthFailures()
return totalAuthFailures;
|
public int | getTotalAuthSuccesses()
return totalAuthSuccess;
|
public int | getTotalFailures()
return totalFaults;
|
public int | getTotalSuccesses()
return totalSuccess;
|
public void | precheck()
if ( enterTime == 0 ) {
throw new RuntimeException(
"Request method should also update the request stats");
}
// XXX store this stat into message store if history size is > 0
|
public void | reset()
faultActor = faultString = faultCode = clientHost = clientUser = null;
responseSize = requestSize = totalFaults =
totalSuccess = totalAuthFailures = totalAuthSuccess = 0;
responseTime = totalResponseTime = maxResponseTime =
avgResponseTime = (long) 0;
resetTime = System.currentTimeMillis();
throughput = 0.0;
minResponseTime = -1;
|
public void | setAuthFailure(long t)
// precheck(); -- precheck may not be called for auth failures
clientHost = cHost;
clientUser = cUser;
requestSize = reqSize;
totalFaults++;
totalAuthFailures++;
// since this is success reset the fault related values
faultCode = faultString = faultActor = null;
cleanup();
|
public void | setFault(int resSize, long exitTime, long rTime, java.lang.String fCode, java.lang.String fString, java.lang.String fActor)
precheck();
responseTime = rTime;
calculateResponseTimes (responseTime);
clientHost = cHost;
clientUser = cUser;
requestSize = reqSize;
responseSize = resSize;
totalFaults++;
totalAuthSuccess++;
// since this is success reset the fault related values
faultCode = fCode;
faultString = fString;
faultActor = fActor;
cleanup();
|
public void | setRequestTimeStamp(long t, java.lang.String host, java.lang.String user, int rSize)
enterTime = t;
reqSize = rSize;
cHost = host;
cUser = user;
|
public void | setSuccess(int resSize, long exitTime, long respTime)
precheck();
responseTime = respTime;
calculateResponseTimes (responseTime);
clientHost = cHost;
clientUser = cUser;
requestSize = reqSize;
responseSize = resSize;
totalSuccess++;
totalAuthSuccess++;
// since this is success reset the fault related values
faultCode = faultString = faultActor = null;
cleanup();
|