org.apache.jmeter.testelement
Class JTLData
- Serializable, DataSet, Visualizer
The purpose of TableData is to contain the results of a single .jtl file.
It is equivalent to what the AggregateListener table. A HashMap is used
to store the data. The URL is the key and the value is SamplingStatCalculator
void | add(SampleResult sample) - the implementation will set the start timestamp if the HashMap
is empty. otherwise it will set the end timestamp using the
end time
|
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() - The date we use for the result is 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) - The method will SamplingStatCalculator for the given URL.
|
Set | getStats() - Return a Set of the values
|
List | getStats(List urls) - The purpose of the method is to make it convienant to pass a list
of the URLs and return a list of the SamplingStatCalculators.
|
Set | getURLs() - Return a Set of the URLs
|
boolean | isStats() - By default, the method always returns true.
|
void | loadData() - The implementation loads a single .jtl file and cleans up the
ResultCollector.
|
void | setDataSource(String absolutePath) - 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
|
data
protected HashMap data
endTimestamp
protected long endTimestamp
inputFile
protected File inputFile
jtl_file
protected String jtl_file
startTimestamp
protected long startTimestamp
add
public void add(SampleResult sample)
the implementation will set the start timestamp if the HashMap
is empty. otherwise it will set the end timestamp using the
end time
- add in interface Visualizer
getDataSource
public String getDataSource()
Return the datasource. For files, it should be the absolute path.
For databases, it should be the datasource name created in jmeter.
- getDataSource in interface DataSet
getDataSourceName
public 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.
- getDataSourceName in interface DataSet
getDate
public Date getDate()
The date we use for the result is the start timestamp. The
reasoning is that a test may run for a long time, but it
is most likely scheduled to run using CRON on unix or
scheduled task in windows.
- getDate in interface DataSet
getEndTimestamp
public long getEndTimestamp()
return the timestamp in millisecond format.
- getEndTimestamp in interface DataSet
getMonthDayDate
public String getMonthDayDate()
convienance method for getting the date in mmdd format
- getMonthDayDate in interface DataSet
getMonthDayYearDate
public String getMonthDayYearDate()
convienant method for getting the date in yyyymmdd format
- getMonthDayYearDate in interface DataSet
getStartTimestamp
public long getStartTimestamp()
return the timestamp in millisecond format.
- getStartTimestamp in interface DataSet
getStatistics
public SamplingStatCalculator getStatistics(String url)
The method will SamplingStatCalculator for the given URL. If the URL
doesn't exist, the method returns null.
- getStatistics in interface DataSet
getStats
public Set getStats()
Return a Set of the values
- getStats in interface DataSet
getStats
public List getStats(List urls)
The purpose of the method is to make it convienant to pass a list
of the URLs and return a list of the SamplingStatCalculators. If
no URLs match, the list is empty.
The SamplingStatCalculators will be returned in the same sequence
as the url list.
- getStats in interface DataSet
- array list of non-null entries (may be empty)
getURLs
public Set getURLs()
Return a Set of the URLs
- getURLs in interface DataSet
isStats
public boolean isStats()
By default, the method always returns true. Subclasses can over
ride the implementation.
- isStats in interface Visualizer
loadData
public void loadData()
The implementation loads a single .jtl file and cleans up the
ResultCollector.
- loadData in interface DataSet
setDataSource
public void setDataSource(String absolutePath)
Depending on the implementation, the datasouce could be a file
or a RDBMS. It's up to the implementing class to decide.
- setDataSource in interface DataSet
setEndTimestamp
public void setEndTimestamp(long stamp)
Set the timestamp using the last result from the datasource
- setEndTimestamp in interface DataSet
setStartTimestamp
public void setStartTimestamp(long stamp)
Set the timestamp using the first result from the datasource
- setStartTimestamp in interface DataSet
Copyright © 1998-2010 Apache Software Foundation. All Rights Reserved.