Apache JMeter
1.9

org.apache.jmeter.visualizers
Class RunningSample

java.lang.Object
  |
  +--org.apache.jmeter.visualizers.RunningSample

public class RunningSample
extends Object

Title: RunningSample.java Description: Aggegate sample data container Class which is used to store aggregate sample data. Just instantiate a new instance of this class, and then call addSample() a few times, and pull the stats out with whatever methods you prefer. Copyright: Copyright (c) 2001 Company: Apache Foundation

Version:
1.0
Author:
James Boutcher

Constructor Summary
RunningSample(String label, int index)
          use this constructor.
 
Method Summary
 void addSample(SampleResult res)
          Records a sample.
 long getAverage()
          Returns the average time in milliseconds that samples ran in.
 double getErrorPercentage()
          Returns the raw double value of the percentage of samples with errors that were recorded.
 String getErrorPercentageString()
          Returns a String which represents the percentage of sample errors that have occurred
 int getIndex()
           
 String getLabel()
           
 long getMax()
          Returns the time in milliseconds of the slowest sample.
 long getMin()
          Returns the time in milliseconds of the quickest sample.
 long getNumSamples()
          Returns the number of samples that have been recorded by this instance of the RunningSample class.
 double getRate()
          Returns the throughput associated to this sampler in requests per second.
 double getRatePerMin()
          Returns the throughput associated to this sampler in requests per min.
 String getRateString()
          Returns a String that represents the throughput associated for this sampler, in units appropriate to its dimension: The number is represented in requests/second or requests/minute or requests/hour.
 String toString()
          For debugging purposes, mainly.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RunningSample

public RunningSample(String label,
                     int index)
use this constructor.

Method Detail

getRate

public double getRate()
Returns the throughput associated to this sampler in requests per second. May be slightly skewed because it takes the timestamps of the first and last samples as the total time passed, and the test may actually have started before that start time and ended after that end time.


getRatePerMin

public double getRatePerMin()
Returns the throughput associated to this sampler in requests per min. May be slightly skewed because it takes the timestamps of the first and last samples as the total time passed, and the test may actually have started before that start time and ended after that end time.


getRateString

public String getRateString()
Returns a String that represents the throughput associated for this sampler, in units appropriate to its dimension:

The number is represented in requests/second or requests/minute or requests/hour.

Examples: "34.2/sec" "0.1/sec" "43.0/hour" "15.9/min"

Returns:
a String representation of the rate the samples are being taken at.

getLabel

public String getLabel()

getIndex

public int getIndex()

addSample

public void addSample(SampleResult res)
Records a sample.


getMin

public long getMin()
Returns the time in milliseconds of the quickest sample.

Returns:
the time in milliseconds of the quickest sample.

getMax

public long getMax()
Returns the time in milliseconds of the slowest sample.

Returns:
the time in milliseconds of the slowest sample.

getAverage

public long getAverage()
Returns the average time in milliseconds that samples ran in.

Returns:
the average time in milliseconds that samples ran in.

getNumSamples

public long getNumSamples()
Returns the number of samples that have been recorded by this instance of the RunningSample class.

Returns:
the number of samples that have been recorded by this instance of the RunningSample class.

getErrorPercentage

public double getErrorPercentage()
Returns the raw double value of the percentage of samples with errors that were recorded. (Between 0.0 and 1.0) If you want a nicer return format, see getErrorPercentageString()

Returns:
the raw double value of the percentage of samples with errors that were recorded.

getErrorPercentageString

public String getErrorPercentageString()
Returns a String which represents the percentage of sample errors that have occurred. "0.00%" through "100.00%"

Returns:
a String which represents the percentage of sample errors that have occurred.

toString

public String toString()
For debugging purposes, mainly.

Overrides:
toString in class Object

Apache JMeter
1.9

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