org.perf4j
Class TimingStatistics

java.lang.Object
  extended by org.perf4j.TimingStatistics
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class TimingStatistics
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

TimingStatistics represent a set of statistical measures over a set of timing data, such as a collection of StopWatch instances.

Author:
Alex Devine
See Also:
Serialized Form

Constructor Summary
TimingStatistics()
          Default constructor allows you to set performance statistics later using the setter methods.
TimingStatistics(java.util.Collection<StopWatch> timeRecords)
          This constructor calculates the mean, standard deviation, maximum, minimum and count values of a collection of StopWatch instances that represent logged code execution times.
TimingStatistics(double mean, double standardDeviation, long max, long min, int count)
          Creates a TimingStatistics object with the specified data.
 
Method Summary
 TimingStatistics clone()
           
 boolean equals(java.lang.Object o)
           
 int getCount()
           
 long getMax()
           
 double getMean()
           
 long getMin()
           
 double getStandardDeviation()
           
 int hashCode()
           
 void setCount(int count)
           
 void setMax(long max)
           
 void setMean(double mean)
           
 void setMin(long min)
           
 void setStandardDeviation(double standardDeviation)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TimingStatistics

public TimingStatistics()
Default constructor allows you to set performance statistics later using the setter methods.


TimingStatistics

public TimingStatistics(double mean,
                        double standardDeviation,
                        long max,
                        long min,
                        int count)
Creates a TimingStatistics object with the specified data.

Parameters:
mean - The mean execution time, in ms, of the underlying time records.
standardDeviation - The standard deviation, in ms, of the underlying time records.
max - The maximum value in ms of the logged execution times.
min - The minimum value in ms of the logged execution times.
count - The total number of executions that were timed.

TimingStatistics

public TimingStatistics(java.util.Collection<StopWatch> timeRecords)
This constructor calculates the mean, standard deviation, maximum, minimum and count values of a collection of StopWatch instances that represent logged code execution times. All the StopWatches in the specified collection should have the same tag.

Parameters:
timeRecords - The time records to aggregate.
Method Detail

getMean

public double getMean()

setMean

public void setMean(double mean)

getStandardDeviation

public double getStandardDeviation()

setStandardDeviation

public void setStandardDeviation(double standardDeviation)

getMax

public long getMax()

setMax

public void setMax(long max)

getMin

public long getMin()

setMin

public void setMin(long min)

getCount

public int getCount()

setCount

public void setCount(int count)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

clone

public TimingStatistics clone()
Overrides:
clone in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2008 perf4j.org. All Rights Reserved.