Examples of sampleEnd()


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

                res.setResponseMessage(thrown.toString());
            } else {               
                res.setResponseMessage(e.getLocalizedMessage());
            }
        }
        res.sampleEnd();
        return res;
    }

    private TextMessage createMessage() throws JMSException {
        if (session == null) {
View Full Code Here

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

        res.setSamplerData(myStringProperty);
        res.sampleStart();
        // Do something ...
        res.setResponseData(myStringProperty.toLowerCase(), null);
        res.setDataType(SampleResult.TEXT);
        res.sampleEnd();
        res.setSuccessful(true);
        return res;
    }

    private String myStringProperty;
View Full Code Here

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

                // call setUp and tearDown. Doing that will result in calling
                // the setUp and tearDown method twice and the elapsed time
                // will include setup and teardown.
                tr.runProtected(theClazz, protectable);
                tr.endTest(this.testCase);
                sresult.sampleEnd();
                if (tearDownMethod != null){
                    tearDownMethod.invoke(testObject,new Object[0]);
                }
            } catch (InvocationTargetException e) {
                Throwable cause = e.getCause();
View Full Code Here

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

            result.setSampleCount(loop);
            result.setRequestHeaders(propBuffer.toString());
        } catch (Exception e) {
            result.setResponseMessage(e.toString());
        } finally {
            result.sampleEnd();           
        }
        return result;
    }

    private Map<String, Object> getMapContent() throws ClassNotFoundException, SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException {
View Full Code Here

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

            }
            IOUtils.closeQuietly(input);
            IOUtils.closeQuietly(output);
        }

        res.sampleEnd();
        return res;
    }

    /** {@inheritDoc} */
    public boolean interrupt() {
View Full Code Here

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

        SampleResult result = new SampleResult();
        result.setDataType(SampleResult.TEXT);
        result.setSampleLabel(getName());
        result.sampleStart();
        if (exceptionDuringInit != null) {
            result.sampleEnd();
            result.setSuccessful(false);
            result.setResponseCode("000");
            result.setResponseMessage(exceptionDuringInit.toString());
            return result;
        }
View Full Code Here

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

            } catch (JMSException e) {
                log.warn("Error "+e.toString());
            }
            now = System.currentTimeMillis();
        }
        result.sampleEnd();
        result.setResponseMessage(read + " samples messages received");
        if (getReadResponseAsBoolean()) {
            result.setResponseData(buffer.toString().getBytes()); // TODO - charset?
        } else {
            result.setBytes(buffer.toString().getBytes().length); // TODO - charset?
View Full Code Here

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

            isSuccessful=false;
            res.setResponseCode("500");
            res.setResponseMessage(ex.toString());
        } finally {
            // Calculate response time
            res.sampleEnd();

            // Set if we were successful or not
            res.setSuccessful(isSuccessful);

            if (!isReUseConnection()) {
View Full Code Here

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

    catch (Exception ex){
      log.debug("",ex);
      res.setResponseCode("500");
      res.setResponseMessage(ex.toString());
    }
    res.sampleEnd(); //End timimg
   
    res.setSuccessful(isOK);

        return res;
    }
View Full Code Here

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

      res.setResponseCode("500");
            res.setResponseMessage(ex.toString());
        }

        // Calculate response time
        res.sampleEnd();

        // Set if we were successful or not
        res.setSuccessful(isSuccessful);

        return res;
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.