net.grinder.console.model
Interface SampleModel

All Known Implementing Classes:
SampleModelImplementation

public interface SampleModel

Interface to SampleModelImplementation.

Author:
Philip Aston

Nested Class Summary
static class SampleModel.AbstractListener
          Skeleton implementation of SampleModel.Listener.
static interface SampleModel.Listener
          Interface for listeners to SampleModelImplementation.
static interface SampleModel.State
          A snapshot of the model state.
 
Method Summary
 void addModelListener(SampleModel.Listener listener)
          Add a new model listener.
 void addSampleListener(Test test, SampleListener listener)
          Add a new sample listener for the specific test.
 void addTestReport(TestStatisticsMap statisticsDelta)
          Add a new test report.
 void addTotalSampleListener(SampleListener listener)
          Add a new total sample listener.
 StatisticExpression getPeakTPSExpression()
          Get the expression for peak TPS.
 SampleModel.State getState()
          Get the current model state.
 StatisticsSet getTotalCumulativeStatistics()
          Get the cumulative statistics for this model.
 StatisticsSet getTotalLatestStatistics()
          Get the total statistics for the latest sample.
 StatisticExpression getTPSExpression()
          Get the statistics expression for TPS.
 void registerTests(Collection<Test> tests)
          Register new tests.
 void reset()
          Discard all of the information held by the model.
 void start()
          Start the model.
 void stop()
          Stop the model.
 void zeroStatistics()
          Zero the statistics.
 

Method Detail

reset

void reset()
Discard all of the information held by the model.

This doesn't change the model state.


zeroStatistics

void zeroStatistics()
Zero the statistics.

Since:
3.10

start

void start()
Start the model.


stop

void stop()
Stop the model.


getState

SampleModel.State getState()
Get the current model state.

Returns:
The model state.

getTPSExpression

StatisticExpression getTPSExpression()
Get the statistics expression for TPS.

Returns:
The TPS expression for this model.

getPeakTPSExpression

StatisticExpression getPeakTPSExpression()
Get the expression for peak TPS.

Returns:
The peak TPS expression for this model.

getTotalCumulativeStatistics

StatisticsSet getTotalCumulativeStatistics()
Get the cumulative statistics for this model.

Returns:
The cumulative statistics.

getTotalLatestStatistics

StatisticsSet getTotalLatestStatistics()
Get the total statistics for the latest sample.

Returns:
The cumulative statistics.

addModelListener

void addModelListener(SampleModel.Listener listener)
Add a new model listener.

Parameters:
listener - The listener.

addTotalSampleListener

void addTotalSampleListener(SampleListener listener)
Add a new total sample listener.

Parameters:
listener - The sample listener.

addSampleListener

void addSampleListener(Test test,
                       SampleListener listener)
Add a new sample listener for the specific test.

Parameters:
test - The test to add the sample listener for.
listener - The sample listener.

registerTests

void registerTests(Collection<Test> tests)
Register new tests.

Parameters:
tests - The new tests.

addTestReport

void addTestReport(TestStatisticsMap statisticsDelta)
Add a new test report.

Parameters:
statisticsDelta - The new test statistics.


Copyright © 2000-2013. All Rights Reserved.