SMILA (incubation) API documentation

org.eclipse.smila.management.performance
Interface PerformanceCounterFormula

All Known Implementing Classes:
AverageFormula, AverageTimerFormula, RateFormula, SimpleCountFormula

public interface PerformanceCounterFormula

Counter value calculation formula interface.


Field Summary
static PerformanceCounterFormula AVERAGE_FORMULA
          Average count formula calculates how many items are processed, on average, during an operation.
static PerformanceCounterFormula AVERAGE_TIMER_FORMULA
          Average timer formulla calculates the time (in seconds) it takes, on average, to complete a process or operation.
static PerformanceCounterFormula RATE_FORMULA
          Rate formula calculates (Xn - X0)/(Tn - T0), where Xi is a counter sample and Ti is the time that the corresponding sample was taken.
static PerformanceCounterFormula SIMPLE_COUNT_FORMULA
          Simple items count formula returning the counter raw value.
 
Method Summary
 double calculateValue(PerformanceSample sample1, PerformanceSample sample2)
          Calculates next counter value by two samples.
 

Field Detail

SIMPLE_COUNT_FORMULA

static final PerformanceCounterFormula SIMPLE_COUNT_FORMULA
Simple items count formula returning the counter raw value.


AVERAGE_FORMULA

static final PerformanceCounterFormula AVERAGE_FORMULA
Average count formula calculates how many items are processed, on average, during an operation. The formula is (Xn - X0)/(Bn - B0) where Xi is a counter sample and the Bi is the corresponding base value (number of counter changes).


RATE_FORMULA

static final PerformanceCounterFormula RATE_FORMULA
Rate formula calculates (Xn - X0)/(Tn - T0), where Xi is a counter sample and Ti is the time that the corresponding sample was taken. The result is the average usage per second.


AVERAGE_TIMER_FORMULA

static final PerformanceCounterFormula AVERAGE_TIMER_FORMULA
Average timer formulla calculates the time (in seconds) it takes, on average, to complete a process or operation. The formula is (Tn - T0)/(Bn - B0) where Bi is base value and the Ti is corresponding timestamp.

Method Detail

calculateValue

double calculateValue(PerformanceSample sample1,
                      PerformanceSample sample2)
Calculates next counter value by two samples.

Parameters:
sample1 - sample1
sample2 - sample2
Returns:
next counter value

SMILA (incubation) API documentation