|
Java HTTP Proxy Library Project Page
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.wpg.proxy.ProxyStatistics
public class ProxyStatistics
ProxyStatistics object is used to track statistics collected during the proxy execution to report to the user via an HTTP request directed to the proxy itself, rather than meant for a remote host or port
Field Summary | |
---|---|
static int |
FAILURE
|
static int |
STOPPED
|
static int |
SUCCESS
|
Method Summary | |
---|---|
void |
addDuration(double duration)
add a duration measurement to the collection of statistics |
double |
getDurationAvg()
|
double |
getDurationCnt()
|
double |
getDurationMax()
|
double |
getDurationMin()
|
double |
getDurationStdDev()
Calculate Standard Deviation as the SQRT of variance based on the formula from: WIKI Variance Calculation Page: Algorithm II |
long |
getFailureTransactions()
get failed transaction count |
java.lang.String |
getHTMLPage()
Get the html page for this request |
Proxy |
getProxy()
Get Proxy for this statistic collector |
static ProxyStatistics |
getSingleton()
|
long |
getStoppedTransactions()
get stopped transaction count, this is a stop due to one of the HttpMessageProcessor rules denying the continuation of the exchange |
long |
getSuccessTransactions()
get successful transaction count |
java.lang.String |
getTitle()
get title of web pages returned |
long |
getTransactionCount()
get transaction count |
void |
incrementTransactionCount(int status)
increment transaction count |
void |
reset()
reset all counters to init values |
void |
setProxy(Proxy p)
Set Proxy object to query |
void |
setTitle(java.lang.String t)
set title of web pages returned |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SUCCESS
public static final int FAILURE
public static final int STOPPED
Method Detail |
---|
public static ProxyStatistics getSingleton()
public void reset()
public void setTitle(java.lang.String t)
public java.lang.String getTitle()
public long getSuccessTransactions()
public long getFailureTransactions()
public long getStoppedTransactions()
public void incrementTransactionCount(int status) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public long getTransactionCount()
public void addDuration(double duration)
public double getDurationCnt()
public double getDurationMin()
public double getDurationMax()
public double getDurationAvg()
public double getDurationStdDev()
double mean = getDurationAvg(); double sum = 0.0; for( int i=0; i< durations.size(); i++ ) { double duration = durations.elementAt(i); sum += Math.pow(duration - mean, 2); } stdDevDuration = Math.sqrt( sum / (durations.size() -1) );
note: Future calculations of this may change based on the whims of man
public void setProxy(Proxy p)
public Proxy getProxy()
public java.lang.String getHTMLPage()
|
Java HTTP Proxy Library Project Page
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |