org.apache.jmeter.visualizers

Class GraphAccumModel

Implemented Interfaces:
Clearable, Serializable

public class GraphAccumModel
extends Object
implements Clearable, Serializable

The model that collects the average of the set of pages to be sampled.

Field Summary

protected long
averageSum
protected boolean
bigChange
protected long
counter
protected SampleResult
current
protected List
listeners
protected long
max
protected String
name
protected long
previous
protected List
samples
protected long
variationSum

Constructor Summary

GraphAccumModel()
Constructor.

Method Summary

void
addGraphAccumListener(GraphAccumListener listener)
Adds a feature to the ModelListener attribute of the GraphAccumModel object.
void
addNewSample(SampleResult res)
Add the new sample to the results.
void
clearData()
Clear the results.
protected void
fireDataChanged()
Depending on whether the graph needs to be rescale call the appropriate methods.
List
getList()
Gets the List attribute of the GraphAccumModel object.
long
getMax()
Gets the Max attribute of the GraphAccumModel object.
String
getName()
Gets the Name attribute of the GraphModel object.
int
getSampleCount()
Gets the SampleCount attribute of the GraphAccumModel object.
protected void
quickUpdate(SampleResult s)
The sample to be added did not exceed the current set of samples so do not need to rescale graph.
void
setName(String name)
Sets the Name attribute of the GraphModel object.

Field Details

averageSum

protected long averageSum

bigChange

protected boolean bigChange

counter

protected long counter

current

protected SampleResult current

listeners

protected List listeners

max

protected long max

name

protected String name

samples

protected List samples

variationSum

protected long variationSum

Constructor Details

GraphAccumModel

public GraphAccumModel()
Constructor.

Method Details

addGraphAccumListener

public void addGraphAccumListener(GraphAccumListener listener)
Adds a feature to the ModelListener attribute of the GraphAccumModel object.
Parameters:
listener - the feature to be added to the GraphAccumListener attribute.

addNewSample

public void addNewSample(SampleResult res)
Add the new sample to the results.
Parameters:
res - sample containing the results

clearData

public void clearData()
Clear the results.
Specified by:
clearData in interface Clearable

fireDataChanged

protected void fireDataChanged()
Depending on whether the graph needs to be rescale call the appropriate methods.

getList

public List getList()
Gets the List attribute of the GraphAccumModel object.
Returns:
the List value

getMax

public long getMax()
Gets the Max attribute of the GraphAccumModel object.
Returns:
the Max value

getName

public String getName()
Gets the Name attribute of the GraphModel object.
Returns:
the Name value

getSampleCount

public int getSampleCount()
Gets the SampleCount attribute of the GraphAccumModel object.
Returns:
the SampleCount value

quickUpdate

protected void quickUpdate(SampleResult s)
The sample to be added did not exceed the current set of samples so do not need to rescale graph.

setName

public void setName(String name)
Sets the Name attribute of the GraphModel object.
Parameters:
name - the new Name value

Copyright © 1998-2010 Apache Software Foundation. All Rights Reserved.