net.sf.colossus.webserver
Class RoundtripTimeBookkeeper

java.lang.Object
  extended by net.sf.colossus.webserver.RoundtripTimeBookkeeper

public class RoundtripTimeBookkeeper
extends java.lang.Object


Nested Class Summary
private  class RoundtripTimeBookkeeper.RoundtripTimeEntry
           
 
Field Summary
private  long indexCounter
           
private  int LAST_N_TO_KEEP
           
(package private)  java.util.LinkedList<RoundtripTimeBookkeeper.RoundtripTimeEntry> lastNTimes
           
 
Constructor Summary
RoundtripTimeBookkeeper(int howManyLastToKeep)
           
 
Method Summary
 void showLastNEntries(java.io.PrintWriter pw)
           
 void storeEntry(long when, long roundtripTime)
          Create and store one RTT entry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

indexCounter

private long indexCounter

LAST_N_TO_KEEP

private final int LAST_N_TO_KEEP

lastNTimes

java.util.LinkedList<RoundtripTimeBookkeeper.RoundtripTimeEntry> lastNTimes
Constructor Detail

RoundtripTimeBookkeeper

public RoundtripTimeBookkeeper(int howManyLastToKeep)
Method Detail

storeEntry

public void storeEntry(long when,
                       long roundtripTime)
Create and store one RTT entry

Parameters:
requestResponseArriveTime - When response arrived
roundtripTime - Actual roundtrip time

showLastNEntries

public void showLastNEntries(java.io.PrintWriter pw)