Package org.apache.jmeter.samplers

Examples of org.apache.jmeter.samplers.SampleResult.sampleStart()


    public SampleResult sample(Entry e) {
        SampleResult res = new SampleResult();
        res.setSampleLabel(getName());
        res.setSamplerData(myStringProperty);
        res.sampleStart();
        // Do something ...
        res.setResponseData(myStringProperty.toUpperCase().getBytes());
        res.setDataType(SampleResult.TEXT);
        res.sampleEnd();
        res.setSuccessful(true);
View Full Code Here


    if (this.PUB == null) {
      this.initClient();
    }
    int loop = this.getIterationCount();
    if (this.PUB != null) {
      result.sampleStart();
      for (int idx = 0; idx < loop; idx++) {
        String tmsg = this.getMessageContent();
        this.PUB.publish(tmsg);
        this.BUFFER.append(tmsg);
      }
View Full Code Here

        res.setSuccessful(true);
        res.setResponseMessageOK();
        res.setResponseCodeOK();


    res.sampleStart();
    Connection conn = null;
    Statement stmt = null;

    try {
View Full Code Here

   
  public SampleResult sample(Entry e) {
        SampleResult res = new SampleResult();
        res.setSampleLabel(getName());
        res.setSamplerData(myStringProperty);
        res.sampleStart();
        // Do something ...
        res.setResponseData(myStringProperty.toLowerCase().getBytes());
        res.setDataType(SampleResult.TEXT);
        res.sampleEnd();
        res.setSuccessful(true);
View Full Code Here

    parent.setSampleLabel(getName());
    parent.setSamplerData(getServerType() + "://" + getUserName() + "@" + getServer());
    /*
     * Perform the sampling
     */
    parent.sampleStart(); // Start timing
    try {
      // Create empty properties
      Properties props = new Properties();

      // Get session
View Full Code Here

      }

      for (int i = 0; i < n; i++) {
              StringBuffer cdata = new StringBuffer();
          SampleResult child = new SampleResult();
          child.sampleStart();
        message = messages[i];

        //if (i == 0)
        { // Assumes all the messaged have the same type ...
            child.setContentType(message.getContentType());
View Full Code Here

            log.warn("Cannot set URL: "+e1.getLocalizedMessage());
        }
        InputStream input = null;
        OutputStream output = null;

        res.sampleStart();
        FTPClient ftp = new FTPClient();
    try {
      ftp.connect(getServer());
      res.latencyEnd();
      int reply = ftp.getReplyCode();
View Full Code Here

  {
    // log.info(getLabel()+" "+getFilename());
    SampleResult res = new SampleResult();
    boolean isSuccessful = false;
    res.setSampleLabel(getLabel());
    res.sampleStart();
    final BeanShellInterpreter bshInterpreter = getBeanShellInterpreter();
    if (bshInterpreter == null) {
      res.sampleEnd();
      res.setResponseCode("503");//$NON-NLS-1$
      res.setResponseMessage("BeanShell Interpreter not found");
View Full Code Here

  public SampleResult sample(Entry entry) {
    SampleResult res = new SampleResult();
    res.setSampleLabel(getName());
    res.setSamplerData(getContent());
    res.setDataType(SampleResult.TEXT);
    res.sampleStart();

    try {
      TextMessage msg = createMessage();

      if (isOneway()) {
View Full Code Here

  private boolean displaySystemProperties;
 
  public SampleResult sample(Entry e) {
        SampleResult res = new SampleResult();
        res.setSampleLabel(getName());
        res.sampleStart();
        StringBuffer sb = new StringBuffer(100);
        StringBuffer rd = new StringBuffer(20); // for request Data
        if (isDisplayJMeterVariables()){
          rd.append("JMeterVariables\n");
          sb.append("JMeterVariables:\n");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.