springs.access
Class StatisticsReferenceUpdate

java.lang.Object
  |
  +--springs.access.StatisticsReferenceUpdate

public class StatisticsReferenceUpdate
extends java.lang.Object

Class keeping statistics about reference updating.

Author:
Sergio Ilarri Artigas

Field Summary
(package private)  springs.util.IncrementalAverageComputator _interestedPerCommandComp
           
(package private)  springs.util.IncrementalAverageComputator _percentageCommunicationsSavingsComp
           
(package private)  springs.util.IncrementalAverageComputator _secondsUpdatingReferenceComp
           
 
Constructor Summary
StatisticsReferenceUpdate()
           
 
Method Summary
 void addInterestedPerCommand(double interested)
          Registers the given number of contexts interested in an agent reference update.
 void addPercentageCommunicationsSavings(double percentage)
          Registers the given number of seconds to update references.
 void addSecondsUpdatingReferences(double seconds)
          Registers the given number of seconds to update references.
 double getAvgInterestedPerCommand()
          Gets the average percentage of contexts interested in an agent reference update.
 double getAvgPercentageSavings()
          Gets the average percentage of savings in reference update, per update.
 double getAvgSecondsUpdatingReferences()
          Gets the average number of seconds spent in reference updating, per update.
 double getPercentageSavings()
          Gets the total percentage of savings in reference updates.
 double getSecondsUpdatingReferences()
          Gets the total number of seconds spent in reference updating.
 void printStatistics()
          Prints the statistics.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_percentageCommunicationsSavingsComp

springs.util.IncrementalAverageComputator _percentageCommunicationsSavingsComp

_secondsUpdatingReferenceComp

springs.util.IncrementalAverageComputator _secondsUpdatingReferenceComp

_interestedPerCommandComp

springs.util.IncrementalAverageComputator _interestedPerCommandComp
Constructor Detail

StatisticsReferenceUpdate

public StatisticsReferenceUpdate()
Method Detail

addSecondsUpdatingReferences

public void addSecondsUpdatingReferences(double seconds)
Registers the given number of seconds to update references.

Parameters:
seconds - the seconds.

addPercentageCommunicationsSavings

public void addPercentageCommunicationsSavings(double percentage)
Registers the given number of seconds to update references.


addInterestedPerCommand

public void addInterestedPerCommand(double interested)
Registers the given number of contexts interested in an agent reference update.

Parameters:
interested - the number of interested contexts.

getSecondsUpdatingReferences

public double getSecondsUpdatingReferences()
Gets the total number of seconds spent in reference updating.

Returns:
the number of seconds.

getAvgSecondsUpdatingReferences

public double getAvgSecondsUpdatingReferences()
Gets the average number of seconds spent in reference updating, per update.

Returns:
the average number of seconds.

getPercentageSavings

public double getPercentageSavings()
Gets the total percentage of savings in reference updates.

Returns:
the total percentage.

getAvgPercentageSavings

public double getAvgPercentageSavings()
Gets the average percentage of savings in reference update, per update.

Returns:
the average percentage of savings.

getAvgInterestedPerCommand

public double getAvgInterestedPerCommand()
Gets the average percentage of contexts interested in an agent reference update.

Returns:
the average percentage.

printStatistics

public void printStatistics()
Prints the statistics.