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.samplers
Class StatisticalSampleResult

    java.lang.Object
      org.apache.jmeter.samplers.SampleResult
          org.apache.jmeter.samplers.StatisticalSampleResult

All Implemented Interfaces:
  Serializable

public class StatisticalSampleResult
extends SampleResult
implements Serializable

Aggregates sample results for use by the Statistical remote batch mode. Samples are aggregated by the key defined by getKey(). TODO: merge error count into parent class?

See Also:
  Serialized Form

Field Summary

Fields inherited from class org.apache.jmeter.samplers.SampleResult
`BINARY, DEFAULT_HTTP_ENCODING, TEXT`

Constructor Summary
`StatisticalSampleResult()`
`StatisticalSampleResult(long stamp, long elapsed)` Deprecated. Needs to be replaced when multiple sample results are sorted out
`StatisticalSampleResult(SampleResult res)`

Method Summary
`void` | `add(SampleResult res)`
`int` | `getErrorCount()` Returns the count of errors.
`static String` | `getKey(SampleEvent event)` Generates the key to be used for aggregating samples as follows: `sampleLabel` "-" `threadGroup` N.B. the key should agree with the fixed items that are saved in the sample.
`long` | `getTime()` Get the time it took this sample to occur.
`long` | `getTimeStamp()` Get the sample timestamp, which may be either the start time or the end time.
`void` | `setErrorCount(int e)`

Methods inherited from class org.apache.jmeter.samplers.SampleResult
`addAssertionResult, addSubResult, configure, createTestSample, createTestSample, currentTimeInMs, getAllThreads, getAssertionResults, getBytes, getContentType, getDataEncoding, getDataEncodingNoDefault, getDataEncodingWithDefault, getDataType, getEndTime, getGroupThreads, getIdleTime, getLatency, getMediaType, getParent, getRequestHeaders, getResponseCode, getResponseData, getResponseDataAsString, getResponseHeaders, getResponseMessage, getResultFileName, getSampleCount, getSampleLabel, getSampleLabel, getSamplerData, getSaveConfig, getStartTime, getSubResults, getThreadName, getURL, getUrlAsString, isMonitor, isResponseCodeOK, isStampedAtStart, isStopTest, isStopTestNow, isStopThread, isSuccessful, latencyEnd, markFile, sampleEnd, samplePause, sampleResume, sampleStart, setAllThreads, setBytes, setContentType, setDataEncoding, setDataType, setEncodingAndType, setEndTime, setGroupThreads, setLatency, setMonitor, setParent, setRequestHeaders, setResponseCode, setResponseCodeOK, setResponseData, setResponseData, setResponseHeaders, setResponseMessage, setResponseMessageOK, setResultFileName, setSampleCount, setSampleLabel, setSamplerData, setSaveConfig, setStampAndTime, setStartTime, setStopTest, setStopTestNow, setStopThread, setSuccessful, setThreadName, setTime, setTimeStamp, setURL, storeSubResult, toString`

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

Constructor Detail

### StatisticalSampleResult

    public StatisticalSampleResult()

### StatisticalSampleResult

    public StatisticalSampleResult(long stamp,
                                   long elapsed)

  Deprecated. Needs to be replaced when multiple sample results are sorted out

  Allow OldSaveService to generate a suitable result when sample/error counts have been saved.

Parameters:
  `stamp` -
  `elapsed` -

### StatisticalSampleResult

    public StatisticalSampleResult(SampleResult res)

Method Detail

### add

    public void add(SampleResult res)

### getTime

    public long getTime()

  Description copied from class: `SampleResult`
  Get the time it took this sample to occur.

  Overrides:
    `getTime` in class `SampleResult`
  Returns:
    elapsed time in milliseonds

### getTimeStamp

    public long getTimeStamp()

  Description copied from class: `SampleResult`
  Get the sample timestamp, which may be either the start time or the end time.

  Overrides:
    `getTimeStamp` in class `SampleResult`
  Returns:
    timeStamp in milliseconds
  See Also:
    `SampleResult.getStartTime()`, `SampleResult.getEndTime()`

### getErrorCount

    public int getErrorCount()

  Description copied from class: `SampleResult`
  Returns the count of errors.

  Overrides:
    `getErrorCount` in class `SampleResult`
  Returns:
    0 - or 1 if the sample failed

### setErrorCount

    public void setErrorCount(int e)

  Overrides:
    `setErrorCount` in class `SampleResult`

### getKey

    public static String getKey(SampleEvent event)

  Generates the key to be used for aggregating samples as follows:
  `sampleLabel` "-" `threadGroup` N.B. the key should agree with the fixed items that are saved in the sample.

  Parameters:
    `event` - sample event whose key is to be calculated
  Returns:
    the key to use for aggregating samples

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-2009 Apache Software Foundation. All Rights Reserved.