compiler.done(transactionPack);
// Transaction is done, we do not have a sampler to sample
current = null;
}
else {
Sampler prev = current;
// It is the sub sampler of the transaction that will be sampled
current = transactionSampler.getSubSampler();
if (current instanceof TransactionSampler){
SampleResult res = process_sampler(current, prev, threadContext);// recursive call
threadContext.setCurrentSampler(prev);
current=null;
if (res!=null){
transactionSampler.addSubSamplerResult(res);
}
}
}
}
// Check if we have a sampler to sample
if(current != null) {
threadContext.setCurrentSampler(current);
// Get the sampler ready to sample
SamplePackage pack = compiler.configureSampler(current);
runPreProcessors(pack.getPreProcessors());
// Hack: save the package for any transaction controllers
threadVars.putObject(PACKAGE_OBJECT, pack);
delay(pack.getTimers());
Sampler sampler = pack.getSampler();
sampler.setThreadContext(threadContext);
// TODO should this set the thread names for all the subsamples?
// might be more efficient than fetching the name elsewehere
sampler.setThreadName(threadName);
TestBeanHelper.prepare(sampler);
// Perform the actual sample
currentSampler = sampler;
SampleResult result = sampler.sample(null);
currentSampler = null;
// TODO: remove this useless Entry parameter
// If we got any results, then perform processing on the result
if (result != null) {