|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.grizzly.http.embed.Statistics
public class Statistics
This class can be used to monitor the GrizzlyWebServer
. The statistics
available from this class are:
ThreadPoolStatistic
: Statistics about
the thread pool (called ExecutorService
in Grizzly), StatsThreadPool
.
KeepAliveStats
: Statistic about how the http keep-alive mechanism like
how many times a connection was re-used, how many request were using http 1.1 keep-alive,
etc.RequestGroupInfo
: Statistics about how many connection are
currently supported by Grizzly, how many many bytes has been read so far, how many
http request with status code of 200, 404, etc.To use this class, just do:
GrizzlyWebServer ws = new GrizzlyWebServer("/var/www");
Statistics stats = ws.getStatistic();
stats.startGatheringStatistics();
ws.start();
Constructor Summary | |
---|---|
protected |
Statistics(SelectorThread st)
Create a Statistic class powered uner the hood by the SelectorThread . |
Method Summary | |
---|---|
KeepAliveStats |
getKeepAliveStatistics()
Return an instance of KeepAliveStats , which gather information
about the connection and the keep-alive mechanism. |
RequestGroupInfo |
getRequestStatistics()
Return an instance of RequestGroupInfo , which gather information
about all the requests made to Grizzly. |
ThreadPoolStatistic |
getThreadPoolStatistics()
Return an instance of ThreadPoolStatistic , which gather information
about the current thread pool used by Grizzly. |
void |
startGatheringStatistics()
Start gathering statistics. |
void |
stopGatheringStatistics()
Stop gathering statistics. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Statistics(SelectorThread st)
SelectorThread
.
st
- the SelectorThread
Method Detail |
---|
public ThreadPoolStatistic getThreadPoolStatistics()
ThreadPoolStatistic
, which gather information
about the current thread pool used by Grizzly.
ThreadPoolStatistic
, which gather information
about the current thread pool used by Grizzly.public KeepAliveStats getKeepAliveStatistics()
KeepAliveStats
, which gather information
about the connection and the keep-alive mechanism.
KeepAliveStats
, which gather information
about the connection and the keep-alive mechanism.public RequestGroupInfo getRequestStatistics()
RequestGroupInfo
, which gather information
about all the requests made to Grizzly.
RequestGroupInfo
, which gather information
about all the requests made to Grizzly.public void startGatheringStatistics()
public void stopGatheringStatistics()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |