Package org.apache.jmeter.samplers
Class StatisticalSampleResult
java.lang.Object
org.apache.jmeter.samplers.SampleResult
org.apache.jmeter.samplers.StatisticalSampleResult
- All Implemented Interfaces:
- Serializable,- Cloneable,- Searchable
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:
- 
Field SummaryFields inherited from class org.apache.jmeter.samplers.SampleResultBINARY, DEFAULT_ENCODING, DEFAULT_HTTP_ENCODING, TEXT
- 
Constructor SummaryConstructorsConstructorDescriptionStatisticalSampleResult(long stamp, long elapsed) Deprecated.Needs to be replaced when multiple sample results are sorted outCreate a statistical sample result from an ordinary sample result.
- 
Method SummaryModifier and TypeMethodDescriptionvoidadd(SampleResult res) protected voidintReturns the count of errors.static StringgetKey(SampleEvent event, boolean keyOnThreadName) Generates the key to be used for aggregating samples as follows:
 sampleLabel"-"[threadName|threadGroup]longgetTime()Get the time it took this sample to occur.longGet the sample timestamp, which may be either the start time or the end time.voidsetErrorCount(int e) Methods inherited from class org.apache.jmeter.samplers.SampleResultaddAssertionResult, addRawSubResult, addSubResult, addSubResult, cleanAfterSample, clone, connectEnd, createTestSample, createTestSample, currentTimeInMillis, getAllThreads, getAssertionResults, getBodySize, getBodySizeAsLong, getBytes, getBytesAsLong, getConnectTime, getContentType, getDataEncodingNoDefault, getDataEncodingWithDefault, getDataEncodingWithDefault, getDataType, getEndTime, getFirstAssertionFailureMessage, getGroupThreads, getHeadersSize, getIdleTime, getLatency, getMediaType, getParent, getRequestHeaders, getResponseCode, getResponseData, getResponseDataAsString, getResponseHeaders, getResponseMessage, getResultFileName, getSampleCount, getSampleLabel, getSampleLabel, getSamplerData, getSaveConfig, getSearchableTokens, getSentBytes, getStartTime, getSubResults, getTestLogicalAction, getThreadName, getURL, getUrlAsString, isBinaryType, isIgnore, isMonitor, isRenameSampleLabel, isResponseCodeOK, isStampedAtStart, isStartNextThreadLoop, isStopTest, isStopTestNow, isStopThread, isSuccessful, latencyEnd, markFile, removeAssertionResults, removeSubResults, sampleEnd, samplePause, sampleResume, sampleStart, setAllThreads, setBodySize, setBodySize, setBytes, setBytes, setConnectTime, setContentType, setDataEncoding, setDataType, setEncodingAndType, setEndTime, setGroupThreads, setHeadersSize, setIdleTime, setIgnore, setLatency, setMonitor, setParent, setRequestHeaders, setResponseCode, setResponseCodeOK, setResponseData, setResponseData, setResponseData, setResponseHeaders, setResponseMessage, setResponseMessageOK, setResponseOK, setResultFileName, setSampleCount, setSampleLabel, setSamplerData, setSaveConfig, setSentBytes, setStampAndTime, setStartNextThreadLoop, setStartTime, setStopTest, setStopTestNow, setStopThread, setSuccessful, setTestLogicalAction, setThreadName, setTimeStamp, setURL, storeSubResult, storeSubResult, toDebugString, toString
- 
Constructor Details- 
StatisticalSampleResultpublic StatisticalSampleResult()
- 
StatisticalSampleResultDeprecated.Needs to be replaced when multiple sample results are sorted outAllow CsvSaveService to generate a suitable result when sample/error counts have been saved.- Parameters:
- stamp- this may be a start time or an end time (both in milliseconds)
- elapsed- time in milliseconds
 
- 
StatisticalSampleResultCreate a statistical sample result from an ordinary sample result.- Parameters:
- res- the sample result
 
 
- 
- 
Method Details- 
add
- 
getTimepublic long getTime()Description copied from class:SampleResultGet the time it took this sample to occur.- Overrides:
- getTimein class- SampleResult
- Returns:
- elapsed time in milliseconds
 
- 
getTimeStamppublic long getTimeStamp()Description copied from class:SampleResultGet the sample timestamp, which may be either the start time or the end time.- Overrides:
- getTimeStampin class- SampleResult
- Returns:
- timeStamp in milliseconds
- See Also:
 
- 
getErrorCountpublic int getErrorCount()Description copied from class:SampleResultReturns the count of errors.- Overrides:
- getErrorCountin class- SampleResult
- Returns:
- 0 - or 1 if the sample failed TODO do we need allow for nested samples?
 
- 
setErrorCountpublic void setErrorCount(int e) - Overrides:
- setErrorCountin class- SampleResult
 
- 
getKeyGenerates the key to be used for aggregating samples as follows:
 sampleLabel"-"[threadName|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
- keyOnThreadName- true if key should use thread name, otherwise use thread group
- Returns:
- the key to use for aggregating samples
 
- 
appendDebugParameters- Overrides:
- appendDebugParametersin class- SampleResult
 
 
-