com.jeantessier.metrics
Class RatioMeasurement

java.lang.Object
  |
  +--com.jeantessier.metrics.MeasurementBase
        |
        +--com.jeantessier.metrics.RatioMeasurement
All Implemented Interfaces:
Measurement

public class RatioMeasurement
extends MeasurementBase

Divides one measurement (base) by another (divider). Both must be in the same context.

This is the syntax for initializing this type of measurement:

  <init>
      base measurement name [DISPOSE_x]
      divider measurement name [DISPOSE_x]
  </init>
  

If either is missing, this measurement will be NaN.


Constructor Summary
RatioMeasurement(MeasurementDescriptor descriptor, Metrics context, java.lang.String initText)
           
 
Method Summary
 void accept(MeasurementVisitor visitor)
           
protected  double compute()
           
 int getBaseDispose()
           
 java.lang.String getBaseName()
           
 int getDividerDispose()
           
 java.lang.String getDividerName()
           
 boolean isEmpty()
           
 
Methods inherited from class com.jeantessier.metrics.MeasurementBase
add, add, add, add, add, doubleValue, floatValue, getContext, getDescriptor, getLongName, getShortName, getValue, intValue, isCached, isInRange, longValue, perl, setCached, setEmpty, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RatioMeasurement

public RatioMeasurement(MeasurementDescriptor descriptor,
                        Metrics context,
                        java.lang.String initText)
Method Detail

getBaseName

public java.lang.String getBaseName()

getBaseDispose

public int getBaseDispose()

getDividerName

public java.lang.String getDividerName()

getDividerDispose

public int getDividerDispose()

accept

public void accept(MeasurementVisitor visitor)

isEmpty

public boolean isEmpty()
Overrides:
isEmpty in class MeasurementBase

compute

protected double compute()
Overrides:
compute in class MeasurementBase


Dependency Finder 1.1.0 © 2001-2004 Jean Tessier.