/** * Do a sampling and return its results. * * @param e * <code>Entry</code> to be sampled * @return results of the sampling */ @Override public SampleResult sample(Entry e) { return sample(); }
/** * Perform a sample, and return the results * * @return results of the sampling */ public SampleResult sample() { SampleResult res = null; try { res = sample(getUrl(), getMethod(), false, 0); if (res != null) { res.setSampleLabel(getName()); } return res; } catch (Exception e) { return errorResult(e, new HTTPSampleResult()); } }
@Override public AsynSamplerResultHolder call() { JMeterContextService.replaceContext(jmeterContextOfParentThread); HTTPSampleResult httpSampleResult = sampler.sample(url, method, areFollowingRedirect, depth); if (sampler.getCookieManager() != null) { CollectionProperty cookies = sampler.getCookieManager().getCookies(); return new AsynSamplerResultHolder(httpSampleResult, cookies); } else { return new AsynSamplerResultHolder(httpSampleResult, new CollectionProperty()); } } }
log.debug("{} Execute sample: {} and url {}",port, sampler.getMethod(), sampler.getUrl()); result = sampler.sample();
} else { HTTPSampleResult binRes = sample(url, HTTPConstants.GET, false, frameDepth + 1); res.addSubResult(binRes); setParentSampleSuccess(res, res.isSuccessful() && (binRes == null || binRes.isSuccessful()));
log.debug("Location as URL: " + url.toString()); HTTPSampleResult tempRes = sample(url, method, true, frameDepth); if (tempRes != null) { lastRes = tempRes;