Apache JMeter

org.apache.jmeter.report
Interface DataSet

All Superinterfaces:
Visualizer
All Known Implementing Classes:
JTLData

public interface DataSet
extends Visualizer

DataSet extends Visualizer so that it can be used with ResultCollector. Classes implementing the interface should create a new instance of ResultCollector and call setListener(Visualizer) passing itself. When the ResultCollector.loadExistingFile is called, it will pass the SampleResults.


Method Summary
 String getDataSource()
          Return the datasource.
 String getDataSourceName()
          In some cases, we may want to return a string that isn't the full datasource string or something different.
 Date getDate()
          Return the Date object using the start timestamp
 long getEndTimestamp()
          return the timestamp in millisecond format.
 String getMonthDayDate()
          convienance method for getting the date in mmdd format
 String getMonthDayYearDate()
          convienant method for getting the date in yyyymmdd format
 long getStartTimestamp()
          return the timestamp in millisecond format.
 SamplingStatCalculator getStatistics(String url)
          Return the SamplingStatCalculator for a specific URL.
 Set<SamplingStatCalculator> getStats()
          Classes implementing the method should return instance of SamplingStatCalculator.
 List<SamplingStatCalculator> getStats(List urls)
          Convenience method for getting all the SamplingStatCalculators for a given URL.
 Set<?> getURLs()
          Classes implementing the method should return the URL's in the DataSet.
 void loadData()
          Classes implementing the method should load the data from the target location.
 void setDataSource(String datasource)
          Depending on the implementation, the datasouce could be a file or a RDBMS.
 void setEndTimestamp(long stamp)
          Set the timestamp using the last result from the datasource
 void setStartTimestamp(long stamp)
          Set the timestamp using the first result from the datasource
 
Methods inherited from interface org.apache.jmeter.visualizers.Visualizer
add, isStats
 

Method Detail

setDataSource

void setDataSource(String datasource)
Depending on the implementation, the datasouce could be a file or a RDBMS. It's up to the implementing class to decide.

Parameters:
datasource -

getDataSource

String getDataSource()
Return the datasource. For files, it should be the absolute path. For databases, it should be the datasource name created in jmeter.


getDataSourceName

String getDataSourceName()
In some cases, we may want to return a string that isn't the full datasource string or something different. For example, we may want to return just the filename and not the absolutePath of a JTL file.


setStartTimestamp

void setStartTimestamp(long stamp)
Set the timestamp using the first result from the datasource

Parameters:
stamp -

getStartTimestamp

long getStartTimestamp()
return the timestamp in millisecond format.


setEndTimestamp

void setEndTimestamp(long stamp)
Set the timestamp using the last result from the datasource

Parameters:
stamp -

getEndTimestamp

long getEndTimestamp()
return the timestamp in millisecond format.


getDate

Date getDate()
Return the Date object using the start timestamp


getMonthDayDate

String getMonthDayDate()
convienance method for getting the date in mmdd format


getMonthDayYearDate

String getMonthDayYearDate()
convienant method for getting the date in yyyymmdd format


getURLs

Set<?> getURLs()
Classes implementing the method should return the URL's in the DataSet. It is up to the class to return Strings or URL.


getStats

Set<SamplingStatCalculator> getStats()
Classes implementing the method should return instance of SamplingStatCalculator.

Returns:
the set of statistics

getStatistics

SamplingStatCalculator getStatistics(String url)
Return the SamplingStatCalculator for a specific URL.

Parameters:
url -

getStats

List<SamplingStatCalculator> getStats(List urls)
Convenience method for getting all the SamplingStatCalculators for a given URL.

Parameters:
urls -

loadData

void loadData()
Classes implementing the method should load the data from the target location. It doesn't necessarily have to be a file. It could be from a database.


Apache JMeter

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