Package org.apache.jmeter.samplers

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 {
            for (int idx = 0; idx < loop; idx++) {
                if (JMSPublisherGui.TEXT_MSG_RSC.equals(type)){
                    String tmsg = getMessageContent();
View Full Code Here


            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

    public SampleResult runTest(JavaSamplerContext context) {
        SampleResult results = new SampleResult();

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

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

                                + getPropertyAsString(COMPAREDN));
                xmlBuffer.tag("comparedn",getPropertyAsString(COMPAREDN)); // $NON-NLS-1$
                xmlBuffer.tag("comparefilter",getPropertyAsString(COMPAREFILT)); // $NON-NLS-1$
                NamingEnumeration<SearchResult> cmp=null;
                try {
                    res.sampleStart();
                    cmp = LdapExtClient.compare(dirContext, getPropertyAsString(COMPAREFILT),
                            getPropertyAsString(COMPAREDN));
                    if (!cmp.hasMore()) {
                        res.setResponseCode("5"); // $NON-NLS-1$
                        res.setResponseMessage("compareFalse");
View Full Code Here

        res.setResponseCode("200"); // $NON-NLS-1$
        res.setResponseMessage("OK"); // $NON-NLS-1$
        res.setSuccessful(true);
        res.setDataType(SampleResult.TEXT); // Default (can be overridden by the script)

        res.sampleStart();
        try {
            initManager(mgr);
            mgr.declareBean("SampleResult", res, res.getClass()); // $NON-NLS-1$

            // These are not useful yet, as have not found how to get updated values back
View Full Code Here

                xmlBuffer.tag("countlimit",countLimit); // $NON-NLS-1$
                xmlBuffer.tag("timelimit",timeLimit); // $NON-NLS-1$

                NamingEnumeration<SearchResult> srch=null;
                try {
                    res.sampleStart();
                    srch = LdapExtClient.searchTest(
                            dirContext, searchBase, searchFilter,
                            scope, getCountlimAsLong(),
                            getTimelimAsInt(),
                            getRequestAttributes(getAttrs()),
View Full Code Here

        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

            result.setSamplerData("File: "+filename);
        } else {
            result.setSamplerData(getScript());
        }
        result.setDataType(SampleResult.TEXT);
        result.sampleStart();
        try {
            ScriptEngine scriptEngine = getScriptEngine();
            Bindings bindings = scriptEngine.createBindings();
            bindings.put("SampleResult",result);
            Object ret = processFileOrScript(scriptEngine, bindings);
View Full Code Here

            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

        parent.setSamplerData(samplerString);

        /*
         * Perform the sampling
         */
        parent.sampleStart(); // Start timing
        try {
            // Create empty properties
            Properties props = new Properties();

            if (isUseStartTLS()) {
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.