org.sapia.ubik.rmi.server.perf
Class HitsPerSecStatistic

java.lang.Object
  extended by org.sapia.ubik.rmi.server.perf.Statistic
      extended by org.sapia.ubik.rmi.server.perf.HitsPerSecStatistic
Direct Known Subclasses:
HitsPerHourStatistic, HitsPerMinStatistic

public class HitsPerSecStatistic
extends Statistic

Calculates hits per second.

Author:
yduchesne

Method Summary
protected  double convertMillis(long delay)
           
 long getStartTime()
           
 double getStat()
           
 void hit()
          This method must be called by client applications to increment the int counter.
 void hit(int increment)
          This method must be called by client applications to increment the int counter.
protected  void onPostReset()
           
 
Methods inherited from class org.sapia.ubik.rmi.server.perf.Statistic
getName, getValue, incrementDouble, incrementInt, incrementLong, isEnabled, onPreReset, reset, setEnabled, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

hit

public void hit()
This method must be called by client applications to increment the int counter.


hit

public void hit(int increment)
This method must be called by client applications to increment the int counter.

Parameters:
increment -

getStartTime

public long getStartTime()
Returns:
the start time of the current sample interval, in millis.

getStat

public double getStat()
Overrides:
getStat in class Statistic
Returns:
this instance's average, in one of the primitive wrappers (Integer, Long, Float, Double).

onPostReset

protected void onPostReset()
Overrides:
onPostReset in class Statistic

convertMillis

protected double convertMillis(long delay)


Copyright © 2010 Sapia OSS. All Rights Reserved.