Examples of sampleStart()


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

        sb.append("SOLINGER: ").append(getSoLinger()); // $NON-NLS-1$
        sb.append(" EOL: ").append(getEolByte()); // $NON-NLS-1$
        sb.append(" noDelay: ").append(getNoDelay()); // $NON-NLS-1$
        sb.append("]"); // $NON-NLS-1$
        res.setSamplerData(sb.toString());
        res.sampleStart();
        try {
            Socket sock = getSocket(socketKey);
            if (sock == null) {
                res.setResponseCode("500"); //$NON-NLS-1$
                res.setResponseMessage(getError());
View Full Code Here

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

            result.setContentType("text/xml"); // $NON-NLS-1$
            result.setDataType(SampleResult.TEXT);
            result.setSamplerData(fileContents);// WARNING - could be large

            Envelope msgEnv = Envelope.unmarshall(rdoc);
            result.sampleStart();
            SOAPHTTPConnection spconn = null;
            // if a blank HeaderManager exists, try to
            // get the SOAPHTTPConnection. After the first
            // request, there should be a connection object
            // stored with the cookie header info.
View Full Code Here

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

        res.setSuccessful(true);
        res.setResponseMessageOK();
        res.setSamplerData(data);
        res.setDataType(SampleResult.TEXT);
        res.setContentType("text/plain"); // $NON-NLS-1$
        res.sampleStart();

        try {
            MongoDB mongoDB = MongoSourceElement.getMongoDB(getSource());
            MongoScriptRunner runner = new MongoScriptRunner();
            DB db = mongoDB.getDB(getDatabase(), getUsername(), getPassword());
View Full Code Here

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

            // in order not to confuse the statistics calculation methods: if
            //  an error occurs and an exception is thrown it is possible that
            // the result.sampleStart() or result.sampleEnd() won't be called
            if (result.getStartTime() == 0)
            {
                result.sampleStart();
            }
            if (result.getEndTime() == 0)
            {
                result.sampleEnd();
            }
View Full Code Here

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

            }
        }
        StringBuilder buffer = new StringBuilder();
        StringBuilder propBuffer = new StringBuilder();
        int loop = getIterationCount();
        result.sampleStart();
        String type = getMessageChoice();
       
        try {
            Map<String, Object> msgProperties = getJMSProperties().getJmsPropertysAsMap();
            for (int idx = 0; idx < loop; idx++) {
View Full Code Here

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

            results.setResponseData(resultData, null);
            results.setDataType(SampleResult.TEXT);
        }

        // Record sample start time.
        results.sampleStart();

        long sleep = sleepTime;
        if (sleepTime > 0 && sleepMask > 0) { // / Only do the calculation if
                                                // it is needed
            long start = System.currentTimeMillis();
View Full Code Here

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

        }
        results.setSamplerData("Sleep Test: time = " + sleep);

        try {
            // Record sample start time.
            results.sampleStart();

            // Execute the sample. In this case sleep for the
            // specified time.
            TimeUnit.MILLISECONDS.sleep(sleep);
View Full Code Here

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

            threadStarted(true);
        }
        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());
View Full Code Here

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

        SampleResult res = new SampleResult();
        res.setSampleLabel(getName());
        res.setSamplerData(getContent());
        res.setSuccessful(false); // Assume failure
        res.setDataType(SampleResult.TEXT);
        res.sampleStart();

        try {
            TextMessage msg = createMessage();
            if (isOneway()) {
                producer.send(msg);
View Full Code Here

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

                    }
                }
                final Method m = getMethod(this.TEST_INSTANCE,getMethod());
                final TestCase theClazz = this.TEST_INSTANCE;
                tr.startTest(this.TEST_INSTANCE);
                sresult.sampleStart();
                // Do not use TestCase.run(TestResult) method, since it will
                // 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.
                Protectable p = new Protectable() {
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.