Package org.apache.jmeter.samplers

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


    result.setSampleLabel(getName());
    OnMessageSubscriber sub = initListenerClient();

    this.loop = this.getIterationCount();

    result.sampleStart();
    while (this.RUN && this.count(0) < this.loop) {
      try {
        Thread.sleep(0, 50);
      } catch (Exception e) {
        log.info(e.getMessage());
View Full Code Here


      this.SUBSCRIBER.start();
    }
    this.loop = this.getIterationCount();
    this.SUBSCRIBER.setLoop(this.loop);

    result.sampleStart();
    while (this.SUBSCRIBER.count(0) < this.loop) {
      try {
        Thread.sleep(0, 50);
      } catch (Exception e) {
        log.info(e.getMessage());
View Full Code Here

        log.debug(getLabel() + " " + getFilename() + " " + getUsername() + " " + getPassword());
        SampleResult res = new SampleResult();
        boolean isSuccessful = false;
        res.setSampleLabel(getName());// Use the test element name for the label
        res.setSamplerData("Host: " + getServer() + " Port: " + getPort()); //$NON-NLS-1$ $NON-NLS-2$
        res.sampleStart();
        try {
            Socket sock = getSocket(socketKey);
            if (sock == null) {
                res.setResponseCode("500"); //$NON-NLS-1$
                res.setResponseMessage(getError());
View Full Code Here

        res.setSampleLabel(getTitle());
        /*
         * Perform the sampling
         */
        res.sampleStart(); // Start timing
        try {

            // Do something here ...

            response = Thread.currentThread().getName();
View Full Code Here

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


        res.sampleStart();
        Connection conn = null;

        try {
            if(JOrphanUtils.isBlank(getDataSource())) {
                throw new IllegalArgumentException("Variable Name must not be null in "+getName());
View Full Code Here

            result.setSamplerData(fileContents);// WARNING - could be large

            Envelope msgEnv = Envelope.unmarshall(rdoc);
            // create a new message
            Message msg = new Message();
            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

            // 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

            res.setSamplerData("Error occurred trying to save request info: "+e1);
            log.warn("Error occurred trying to save request info",e1);
        }

        // Perform the sampling
        res.sampleStart();

        try {
            instance.execute(message);

            res.setResponseCodeOK();
View Full Code Here

            try {
                if(log.isDebugEnabled()) {
                    log.debug("Will run :"+cmdLine + " using working directory:"+directory.getAbsolutePath()+
                            " with environment:"+env);
                }
                results.sampleStart();
                int returnCode = nativeCommand.run(cmds);
                if(log.isDebugEnabled()) {
                    log.debug("Ran :"+cmdLine + " using working directory:"+directory.getAbsolutePath()+
                            " with execution environment:"+nativeCommand.getExecutionEnvironment());
                }
View Full Code Here

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

        res.sampleStart();
        FTPClient ftp = new FTPClient();
        try {
            savedClient = ftp;
            final int port = getPortAsInt();
            if (port > 0){
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.