Class RespTimeGraphVisualizer

All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, ChangeListener, ClearGui, JMeterGUIComponent, UnsharedComponent, Clearable, Printable, Visualizer

public class RespTimeGraphVisualizer extends AbstractVisualizer implements ActionListener, Clearable
See Also:
  • Field Details

  • Constructor Details

    • RespTimeGraphVisualizer

      public RespTimeGraphVisualizer()
  • Method Details

    • add

      public void add(SampleResult sampleResult)
      Description copied from interface: Visualizer
      This method is called by sampling thread to inform the visualizer about the arrival of a new sample.
      Specified by:
      add in interface Visualizer
      Parameters:
      sampleResult - the newly arrived sample
    • makeGraph

      public void makeGraph()
    • getData

      public double[][] getData()
      Generate the data for the jChart API
      Returns:
      array of array of data to draw
    • getLabelResource

      public String getLabelResource()
      Description copied from interface: JMeterGUIComponent
      Get the component's resource name, which getStaticLabel uses to derive the component's label in the local language. The resource name is fixed, and does not vary with the selected language.

      Normally this method should be overridden in preference to overriding getStaticLabel(). However where the resource name is not available or required, getStaticLabel() may be overridden instead.

      Specified by:
      getLabelResource in interface JMeterGUIComponent
      Returns:
      the resource name
    • clearData

      public void clearData()
      Description copied from interface: Clearable
      Clears the current data of the object.
      Specified by:
      clearData in interface Clearable
    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Specified by:
      actionPerformed in interface ActionListener
    • getPrintableComponent

      public JComponent getPrintableComponent()
      Description copied from class: AbstractJMeterGuiComponent
      Subclasses need to over-ride this method, if they wish to return something other than the Visualizer itself.
      Specified by:
      getPrintableComponent in interface Printable
      Overrides:
      getPrintableComponent in class AbstractJMeterGuiComponent
      Returns:
      this object
    • configure

      public void configure(org.apache.jmeter.testelement.TestElement te)
      Description copied from class: AbstractJMeterGuiComponent
      A newly created gui component can be initialized with the contents of a Test Element object by calling this method. The component is responsible for querying the Test Element object for the relevant information to display in its GUI.

      AbstractJMeterGuiComponent provides a partial implementation of this method, setting the name of the component and its enabled status. Subclasses should override this method, performing their own configuration as needed, but also calling this super-implementation.

      Specified by:
      configure in interface JMeterGUIComponent
      Overrides:
      configure in class AbstractVisualizer
      Parameters:
      te - the TestElement to configure
    • modifyTestElement

      public void modifyTestElement(org.apache.jmeter.testelement.TestElement te)
      Description copied from interface: JMeterGUIComponent
      GUI components are responsible for populating TestElements they create with the data currently held in the GUI components. This method should overwrite whatever data is currently in the TestElement as it is called after a user has filled out the form elements in the gui with new information.

      If you override AbstractJMeterGuiComponent, you might want using AbstractJMeterGuiComponent.bindingGroup instead of overriding modifyTestElement.

      The canonical implementation looks like this:

       @Override
       public void modifyTestElement(TestElement element) {
           super.modifyTestElement(element); // clear the element and assign basic fields like name, gui class, test class
           // Using the element setters (preferred):
           // If the field is empty, you probably want to remove the property instead of storing an empty string
           // See Streamline binding of UI elements to TestElement properties
           // for more details
           TestElementXYZ xyz = (TestElementXYZ) element;
           xyz.setState(StringUtils.defaultIfEmpty(guiState.getText(), null));
           xyz.setCode(StringUtils.defaultIfEmpty(guiCode.getText(), null));
           ... other GUI fields ...
           // or directly (do not use unless there is no setter for the field):
           element.setProperty(TestElementXYZ.STATE, StringUtils.defaultIfEmpty(guiState.getText(), null))
           element.setProperty(TestElementXYZ.CODE, StringUtils.defaultIfEmpty(guiCode.getText(), null))
           ... other GUI fields ...
       }
       
      Specified by:
      modifyTestElement in interface JMeterGUIComponent
      Overrides:
      modifyTestElement in class AbstractVisualizer
      Parameters:
      te - the TestElement to modify
    • clearGui

      public void clearGui()
      Implements JMeterGUIComponent.clearGui
      Specified by:
      clearGui in interface ClearGui
      Overrides:
      clearGui in class AbstractVisualizer
    • getXAxisLabels

      public String[] getXAxisLabels()