org.openware.loadsim.output
Class SampleResult

java.lang.Object
  |
  +--org.openware.loadsim.output.SampleResult
All Implemented Interfaces:
java.io.Serializable

public class SampleResult
extends java.lang.Object
implements java.io.Serializable

Each link visited during the load simulation produces a SampleResult object. It contains all of the information that winds up in the output CSV file at the end of the simulation (TTFB, TTLB, file size, etc.) as well as the contents of the downloaded page (accessible as an HttpUnit WebResponse object) and the next link.

Author:
Vincent Sheffer
See Also:
Serialized Form

Constructor Summary
SampleResult()
           
 
Method Summary
 void dump(org.openware.loadsim.output.WriterWrapper writer)
           
 java.lang.String getContentType()
           
 java.lang.String getHostname()
           
 java.lang.String getLabel()
           
 com.meterware.httpunit.WebResponse getLastPage()
          Get the contents of the last page as an HttpUnit WebResponse object.
 Link getNextLink()
          Get the next link in the simulation.
 int getResponseCode()
          Get the HTTP response code for the current link.
 boolean isRamping()
           
 void setContentType(java.lang.String contentType)
           
 void setHostname(java.lang.String hostname)
           
 void setLabel(java.lang.String label)
           
 void setLastPage(com.meterware.httpunit.WebResponse lastpage)
           
 void setNextLink(Link link)
           
 void setRamping(boolean ramping)
           
 void setResponseCode(int code)
           
 void setSize(int size)
           
 void setTTFB(long duration)
          Set the time-to-first-byte.
 void setTTLB(long duration)
          Set the time-to-first-byte.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SampleResult

public SampleResult()
Method Detail

setLabel

public void setLabel(java.lang.String label)

getLabel

public java.lang.String getLabel()

setRamping

public void setRamping(boolean ramping)

isRamping

public boolean isRamping()

setHostname

public void setHostname(java.lang.String hostname)

getHostname

public java.lang.String getHostname()

setNextLink

public void setNextLink(Link link)

getNextLink

public Link getNextLink()
Get the next link in the simulation.

setTTLB

public void setTTLB(long duration)
Set the time-to-first-byte. This is the time between sending the request and receiving the last byte of response.

setTTFB

public void setTTFB(long duration)
Set the time-to-first-byte. This is the time between sending the request and receiving the first byte of response.

setLastPage

public void setLastPage(com.meterware.httpunit.WebResponse lastpage)

setContentType

public void setContentType(java.lang.String contentType)

setResponseCode

public void setResponseCode(int code)

getContentType

public java.lang.String getContentType()

getLastPage

public com.meterware.httpunit.WebResponse getLastPage()
Get the contents of the last page as an HttpUnit WebResponse object. All of the elements accessible in that object (forms, anchor tags, tables, etc.) are, therefore, accessible here. The raw text of the page is available from this object as well if you want to bypass the HttpUnit parsing.

dump

public void dump(org.openware.loadsim.output.WriterWrapper writer)

setSize

public void setSize(int size)

getResponseCode

public int getResponseCode()
Get the HTTP response code for the current link.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2000, 2001 Openware, Spin Software. All Rights Reserved.