Package org.apache.jmeter.samplers

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


    {
      log.info(getLabel()+" "+getFilename()+" "+getUsername()+" "+getPassword());
        SampleResult res = new SampleResult();
        boolean isSuccessful = false;
        res.setSampleLabel(getLabel());
        res.sampleStart();
        try
        {
      Socket sock = getSocket();
      if (sock == null){
        res.setResponseCode("500");
View Full Code Here


      results.setResponseData(resultData.getBytes());
      results.setDataType(SampleResult.TEXT);
    }

    // Record sample start time.
    results.sampleStart();
   
    long start = System.currentTimeMillis();

    // Generate a random offset value using the current time.
        long sleep = getSleepTime() + (start % getSleepMask());
View Full Code Here

    {
      //log.info(getLabel()+" "+getFilename());
        SampleResult res = new SampleResult();
        boolean isSuccessful = false;
        res.setSampleLabel(getLabel());
        res.sampleStart();
        try
        {
          String request=getScript();
          String fileName=getFilename();
          if (fileName.length() == 0) {
View Full Code Here

      results.setResponseData(resultData.getBytes());
      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

        SampleResult results = new SampleResult();

        try
        {
            // Record sample start time.
            results.sampleStart();
           
      // Generate a random value using the current time.
            long start = System.currentTimeMillis();
            long sleep = getSleepTime() + (start % getSleepMask());
View Full Code Here

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


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

        try {
View Full Code Here

                    }
                }
                final Method m = getMethod(this.TEST_INSTANCE,methodName);
                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

            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

    public SampleResult sample(Entry e)
    {
        SampleResult sr = new SampleResult();
        sr.setSampleLabel(getName());
        sr.sampleStart();
        sr.setDataType(SampleResult.TEXT);
        long start = sr.currentTimeInMillis();
        String message = "ERROR: UNKNOWN";
        ResponseData response = null;
        try
View Full Code Here

    public void process(){
        StringBuilder sb = new StringBuilder(100);
        StringBuilder rd = new StringBuilder(20); // for request Data
        SampleResult sr = new SampleResult();
        sr.setSampleLabel(getName());
        sr.sampleStart();
        JMeterContext threadContext = getThreadContext();
        if (isDisplaySamplerProperties()){
            rd.append("SamplerProperties\n");
            sb.append("SamplerProperties:\n");
            formatPropertyIterator(sb, threadContext.getCurrentSampler().propertyIterator());
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.