seda.sandStorm.internal
Class StageStats

java.lang.Object
  extended by seda.sandStorm.internal.StageStats
All Implemented Interfaces:
StageStatsIF

public class StageStats
extends java.lang.Object
implements StageStatsIF

This class provides controllers with a view of statistics gathered by the stage internally during execution.


Field Summary
private  int count
           
private  long cumulativeEvents
           
private static boolean DEBUG
           
private static int ESTIMATION_SIZE
           
private static long ESTIMATION_TIME
           
private  boolean first
           
private  long lastTime
           
private static boolean PROFILE
           
private  double rt90thPercentile
           
private  double serviceRate
           
private static double SMOOTH_ALPHA
           
(package private)  StageWrapperIF stage
           
private  long totalEvents
           
private  long totalServiceTime
           
 
Constructor Summary
StageStats(StageWrapperIF stage)
           
 
Method Summary
 double get90thRT()
          Get 90th percentile response time in msec.
 double getServiceRate()
          Return a moving average of the service rate.
 long getTotalEvents()
          Get total number of processed events.
 void record90thRT(double rt_sample)
          Record 90th percentile response time in msec.
 void recordServiceRate(int numEvents, long time)
          Record the service time for numEvents taking 'time' msec to be processed.
 void reset()
          Reset all statistics.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

private static final boolean DEBUG
See Also:
Constant Field Values

PROFILE

private static final boolean PROFILE
See Also:
Constant Field Values

SMOOTH_ALPHA

private static final double SMOOTH_ALPHA
See Also:
Constant Field Values

ESTIMATION_SIZE

private static final int ESTIMATION_SIZE
See Also:
Constant Field Values

ESTIMATION_TIME

private static final long ESTIMATION_TIME
See Also:
Constant Field Values

stage

StageWrapperIF stage

serviceRate

private double serviceRate

rt90thPercentile

private double rt90thPercentile

first

private boolean first

lastTime

private long lastTime

count

private int count

totalServiceTime

private long totalServiceTime

totalEvents

private long totalEvents

cumulativeEvents

private long cumulativeEvents
Constructor Detail

StageStats

public StageStats(StageWrapperIF stage)
Method Detail

reset

public void reset()
Reset all statistics.

Specified by:
reset in interface StageStatsIF

getServiceRate

public double getServiceRate()
Return a moving average of the service rate.

Specified by:
getServiceRate in interface StageStatsIF

getTotalEvents

public long getTotalEvents()
Get total number of processed events.

Specified by:
getTotalEvents in interface StageStatsIF

recordServiceRate

public void recordServiceRate(int numEvents,
                              long time)
Record the service time for numEvents taking 'time' msec to be processed.

Specified by:
recordServiceRate in interface StageStatsIF

record90thRT

public void record90thRT(double rt_sample)
Record 90th percentile response time in msec.

Specified by:
record90thRT in interface StageStatsIF

get90thRT

public double get90thRT()
Get 90th percentile response time in msec.

Specified by:
get90thRT in interface StageStatsIF