use of org.apache.jmeter.visualizers.backend.Backend in project jmeter by apache.
the class TreeClonerForValidation method addNodeToTree.
/**
* @see org.apache.jmeter.engine.TreeCloner#addNodeToTree(java.lang.Object)
*/
@Override
protected Object addNodeToTree(Object node) {
if ((VALIDATION_IGNORE_TIMERS && node instanceof Timer) || (VALIDATION_IGNORE_BACKENDS && node instanceof Backend)) {
// don't add timer or backend
return node;
} else {
Object clonedNode = super.addNodeToTree(node);
if (clonedNode instanceof org.apache.jmeter.threads.ThreadGroup) {
ThreadGroup tg = (ThreadGroup) clonedNode;
tg.setNumThreads(VALIDATION_NUMBER_OF_THREADS);
tg.setScheduler(false);
tg.setProperty(ThreadGroup.DELAY, 0);
if (((AbstractThreadGroup) clonedNode).getSamplerController() instanceof LoopController) {
((LoopController) ((AbstractThreadGroup) clonedNode).getSamplerController()).setLoops(VALIDATION_ITERATIONS);
}
}
return clonedNode;
}
}
Aggregations