forked from I2P_Developers/i2p.i2p
javadoc
This commit is contained in:
@@ -289,6 +289,7 @@ public class Rate {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the average or lifetime average depending on last event count
|
* @return the average or lifetime average depending on last event count
|
||||||
|
* @since 0.9.4
|
||||||
*/
|
*/
|
||||||
public synchronized double getAvgOrLifetimeAvg() {
|
public synchronized double getAvgOrLifetimeAvg() {
|
||||||
if (getLastEventCount() > 0)
|
if (getLastEventCount() > 0)
|
||||||
@@ -416,6 +417,7 @@ public class Rate {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return a thread-local temp object containing computed averages.
|
* @return a thread-local temp object containing computed averages.
|
||||||
|
* @since 0.9.4
|
||||||
*/
|
*/
|
||||||
public RateAverages computeAverages() {
|
public RateAverages computeAverages() {
|
||||||
return computeAverages(RateAverages.getTemp(),false);
|
return computeAverages(RateAverages.getTemp(),false);
|
||||||
@@ -426,6 +428,7 @@ public class Rate {
|
|||||||
* @param useLifetime whether the lifetime average should be used if
|
* @param useLifetime whether the lifetime average should be used if
|
||||||
* there are no events.
|
* there are no events.
|
||||||
* @return the same RateAverages object for chaining
|
* @return the same RateAverages object for chaining
|
||||||
|
* @since 0.9.4
|
||||||
*/
|
*/
|
||||||
public synchronized RateAverages computeAverages(RateAverages out, boolean useLifetime) {
|
public synchronized RateAverages computeAverages(RateAverages out, boolean useLifetime) {
|
||||||
out.reset();
|
out.reset();
|
||||||
|
@@ -41,7 +41,7 @@ public class RateAverages {
|
|||||||
* if there are any events (current or last) => weighted average
|
* if there are any events (current or last) => weighted average
|
||||||
* otherwise if the useLifetime parameter to Rate.computeAverages was:
|
* otherwise if the useLifetime parameter to Rate.computeAverages was:
|
||||||
* true => the lifetime average value
|
* true => the lifetime average value
|
||||||
* false => the current average value
|
* false => zero
|
||||||
*/
|
*/
|
||||||
public double getAverage() {
|
public double getAverage() {
|
||||||
return average;
|
return average;
|
||||||
|
Reference in New Issue
Block a user