Overview | Package | Class | Tree | Deprecated | Index | Help
| Apache JMeter
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.jmeter.testelement
Class JTLData

    java.lang.Object
      org.apache.jmeter.testelement.JTLData

All Implemented Interfaces:
  Serializable, DataSet, Visualizer

    public class JTLData

extends Object
implements Serializable, DataSet

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

See Also:
  Serialized Form

Constructor Summary
`JTLData()`

Method Summary
`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<SamplingStatCalculator>` | `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

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JTLData

    public JTLData()

Method Detail

### getURLs

    public Set<?> getURLs()

  Return a Set of the URLs

  Specified by:
    `getURLs` in interface `DataSet`
  Returns:
    set of URLs

### getStats

    public Set<SamplingStatCalculator> getStats()

  Return a Set of the values

  Specified by:
    `getStats` in interface `DataSet`
  Returns:
    values

### 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. TODO - this method seems to be wrong - it does not agree with the Javadoc The SamplingStatCalculators will be returned in the same sequence as the url list.

  Specified by:
    `getStats` in interface `DataSet`
  Parameters:
    `urls` -
  Returns:
    array list of non-null entries (may be empty)

### setDataSource

    public void setDataSource(String absolutePath)

  Description copied from interface: `DataSet`
  Depending on the implementation, the datasouce could be a file or a RDBMS. It's up to the implementing class to decide.

  Specified by:
    `setDataSource` in interface `DataSet`

### getDataSource

    public String getDataSource()

  Description copied from interface: `DataSet`
  Return the datasource. For files, it should be the absolute path. For databases, it should be the datasource name created in jmeter.

  Specified by:
    `getDataSource` in interface `DataSet`

### getDataSourceName

    public String getDataSourceName()

  Description copied from interface: `DataSet`
  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.

  Specified by:
    `getDataSourceName` in interface `DataSet`

### setStartTimestamp

    public void setStartTimestamp(long stamp)

  Description copied from interface: `DataSet`
  Set the timestamp using the first result from the datasource

  Specified by:
    `setStartTimestamp` in interface `DataSet`

### getStartTimestamp

    public long getStartTimestamp()

  Description copied from interface: `DataSet`
  return the timestamp in millisecond format.

  Specified by:
    `getStartTimestamp` in interface `DataSet`

### setEndTimestamp

    public void setEndTimestamp(long stamp)

  Description copied from interface: `DataSet`
  Set the timestamp using the last result from the datasource

  Specified by:
    `setEndTimestamp` in interface `DataSet`

### getEndTimestamp

    public long getEndTimestamp()

  Description copied from interface: `DataSet`
  return the timestamp in millisecond format.

  Specified by:
    `getEndTimestamp` 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.

  Specified by:
    `getDate` in interface `DataSet`
  Returns:
    start time

### getMonthDayDate

    public String getMonthDayDate()

  Description copied from interface: `DataSet`
  convienance method for getting the date in mmdd format

  Specified by:
    `getMonthDayDate` in interface `DataSet`

### getMonthDayYearDate

    public String getMonthDayYearDate()

  Description copied from interface: `DataSet`
  convienant method for getting the date in yyyymmdd format

  Specified by:
    `getMonthDayYearDate` 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.

  Specified by:
    `getStatistics` in interface `DataSet`
  Parameters:
    `url` -
  Returns:
    data for this URL

### loadData

    public void loadData()

  The implementation loads a single .jtl file and cleans up the ResultCollector.

  Specified by:
    `loadData` in interface `DataSet`

### 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

  Specified by:
    `add` in interface `Visualizer`

### isStats

    public boolean isStats()

  By default, the method always returns true. Subclasses can over ride the implementation.

  Specified by:
    `isStats` in interface `Visualizer`
  Returns:
    true if visualiser generates statistics

Overview | Package | Class | Tree | Deprecated | Index | Help
| Apache JMeter
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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