Class w3c.jigsaw.http.httpdStatistics
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.jigsaw.http.httpdStatistics

java.lang.Object
   |
   +----w3c.jigsaw.http.httpdStatistics

public class httpdStatistics
extends Object
This class maintains server wide statistics about hits. This class should probably be coded as a resource itself, and made accessible through a specific HTTPResource. I am just having fun for the time being.

Variable Index

 o r_max
The maximum processing time in ms.
 o r_min
The min processing time in ms.
 o server
 o t_bytes
The total number of emited bytes.
 o t_hits
The total number of hits.
 o t_req
The total time spent in processing requests in ms.
 o u_max
The URL that has been processed the slowest.
 o u_min
The URL that has been processed the fastest.

Method Index

 o getEmitedBytes()
Get the total number of bytes emited.
 o getHitCount()
Get the total number of hits.
 o getMaxRequestTime()
Get the max request processing time.
 o getMaxRequestURL()
Get the URL of the request that took the longest time to be processed.
 o getMeanRequestTime()
Get the mean request processing time.
 o getMinRequestTime()
Get the min request processing time.
 o getMinRequestURL()
Get the URL of the request that took the smallest time to be processed.
 o updateStatistics(Client, Request, Reply, int, long)
Update the current statistics with the given request.

Variables

 o server
  protected httpd server
 o r_min
  protected long r_min
The min processing time in ms.
 o u_min
  protected String u_min
The URL that has been processed the fastest.
 o r_max
  protected long r_max
The maximum processing time in ms.
 o u_max
  protected String u_max
The URL that has been processed the slowest.
 o t_hits
  protected long t_hits
The total number of hits.
 o t_bytes
  protected long t_bytes
The total number of emited bytes.
 o t_req
  protected long t_req
The total time spent in processing requests in ms.

Methods

 o updateStatistics
  protected synchronized void updateStatistics(Client client,
                                               Request request,
                                               Reply reply,
                                               int nbytes,
                                               long duration)
Update the current statistics with the given request.
Parameters:
client - The client that processed the request.
request - The request that has been processed.
nbytes - The number of emited bytes in reply's body.
duration - The processing time of the request.
 o getHitCount
  public long getHitCount()
Get the total number of hits.
Returns:
The total number of processed requests since the server is up.
 o getMeanRequestTime
  public long getMeanRequestTime()
Get the mean request processing time.
Returns:
The average time to process a request.
 o getMaxRequestTime
  public long getMaxRequestTime()
Get the max request processing time.
Returns:
A long giving the maximum duration for a request.
 o getMaxRequestURL
  public String getMaxRequestURL()
Get the URL of the request that took the longest time to be processed.
Returns:
A String giving the URL of the corresponding request, or null if no request has been processed yet.
 o getMinRequestTime
  public long getMinRequestTime()
Get the min request processing time.
Returns:
A long giving the minimum request processing time.
 o getMinRequestURL
  public String getMinRequestURL()
Get the URL of the request that took the smallest time to be processed.
Returns:
A String giving the URL of the corresponding request, or null if no request has been processed yet.
 o getEmitedBytes
  public long getEmitedBytes()
Get the total number of bytes emited.
Returns:
A long giving the total number of bytes emited by the server. This count that not include the reply's header, but only the reply's body (or entity size).

All Packages  Class Hierarchy  This Package  Previous  Next  Index