ca.intelliware.amakihi.util.performance
Class PerformanceAnalysisTask

java.lang.Object
  |
  +--org.apache.tools.ant.ProjectComponent
        |
        +--org.apache.tools.ant.Task
              |
              +--org.apache.tools.ant.taskdefs.MatchingTask
                    |
                    +--ca.intelliware.amakihi.util.performance.PerformanceAnalysisTask
All Implemented Interfaces:
org.apache.tools.ant.types.selectors.SelectorContainer

public class PerformanceAnalysisTask
extends org.apache.tools.ant.taskdefs.MatchingTask

FIXME: Most of this class is pretty nasty. Surely we can do better.


Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask
fileset, useDefaultExcludes
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
PerformanceAnalysisTask()
           
 
Method Summary
 void addFileset(org.apache.tools.ant.types.FileSet set)
          Adds a set of files (nested fileset attribute).
protected  double bellcurve(double x, double sigma, double mu)
          Mathematical formula for height of a normal curve.
protected  void createAttributeCollatedResponseTimeChart()
           
protected  void createGraphFrameBottom(java.io.FileWriter writer)
           
protected  void createGraphFrameTop(java.io.Writer writer, int graphWidth, int graphHeight, java.lang.String xAxis, java.lang.String yAxis)
           
protected  void createResponseTimeGraph()
           
 void execute()
           
protected  void gatherMetrics()
           
 java.lang.String getAttributeName()
          Gets the attributeName
protected  java.io.InputStream getInputStream()
           
 int getResponseTimeInterval()
          Gets the responseTimeInterval
protected  double poissonCurve(double x, double mu)
           
 void setAttributeName(java.lang.String attributeName)
          Sets the attributeName
 void setDistributionGraph(java.lang.String filename)
           
 void setOutput(java.lang.String filename)
           
 void setResponseTimeInterval(int responseTimeInterval)
          Sets the responseTimeInterval
protected  void validate()
           
 
Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTask
addAnd, addContains, addCustom, addDate, addDepend, addDepth, addFilename, addMajority, addNone, addNot, addOr, addPresent, addSelector, addSize, appendSelector, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, getDirectoryScanner, getSelectors, hasSelectors, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setExcludes, setExcludesfile, setFollowSymlinks, setIncludes, setIncludesfile, setProject, XsetIgnore, XsetItems
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorOutput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PerformanceAnalysisTask

public PerformanceAnalysisTask()
Method Detail

getResponseTimeInterval

public int getResponseTimeInterval()
Gets the responseTimeInterval
Returns:
Returns a int

setResponseTimeInterval

public void setResponseTimeInterval(int responseTimeInterval)
Sets the responseTimeInterval
Parameters:
responseTimeInterval - The responseTimeInterval to set

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Overrides:
execute in class org.apache.tools.ant.Task

createAttributeCollatedResponseTimeChart

protected void createAttributeCollatedResponseTimeChart()
                                                 throws org.apache.tools.ant.BuildException

createResponseTimeGraph

protected void createResponseTimeGraph()
                                throws org.apache.tools.ant.BuildException

createGraphFrameBottom

protected void createGraphFrameBottom(java.io.FileWriter writer)
                               throws java.io.IOException

createGraphFrameTop

protected void createGraphFrameTop(java.io.Writer writer,
                                   int graphWidth,
                                   int graphHeight,
                                   java.lang.String xAxis,
                                   java.lang.String yAxis)
                            throws java.io.IOException

gatherMetrics

protected void gatherMetrics()
                      throws org.apache.tools.ant.BuildException

bellcurve

protected double bellcurve(double x,
                           double sigma,
                           double mu)

Mathematical formula for height of a normal curve.

The height (ordinate) of a normal curve is defined as:

where mu (m) is the mean and sigma (s) is the standard deviation, pi (p) is the constant 3.14159, and e is the base of natural logarithms and is equal to 2.718282.

x can take on any value from -infinity to +infinity.

f(x) is very close to 0 if x is more than three standard deviations from the mean (less than -3 or greater than +3).


poissonCurve

protected double poissonCurve(double x,
                              double mu)

validate

protected void validate()
                 throws org.apache.tools.ant.BuildException

getInputStream

protected java.io.InputStream getInputStream()
                                      throws org.apache.tools.ant.BuildException

addFileset

public void addFileset(org.apache.tools.ant.types.FileSet set)
Adds a set of files (nested fileset attribute).

setDistributionGraph

public void setDistributionGraph(java.lang.String filename)

setOutput

public void setOutput(java.lang.String filename)

getAttributeName

public java.lang.String getAttributeName()
Gets the attributeName
Returns:
Returns a String

setAttributeName

public void setAttributeName(java.lang.String attributeName)
Sets the attributeName
Parameters:
attributeName - The attributeName to set


Copyright 2002 Intelliware Development. All Rights Reserved.