Search in sources :

Example 1 with LoopController

use of org.apache.jmeter.control.LoopController in project jmeter by apache.

the class ThreadGroupGui method createControllerPanel.

private JPanel createControllerPanel() {
    loopPanel = new LoopControlPanel(false);
    LoopController looper = (LoopController) loopPanel.createTestElement();
    looper.setLoops(1);
    loopPanel.configure(looper);
    return loopPanel;
}
Also used : LoopControlPanel(org.apache.jmeter.control.gui.LoopControlPanel) LoopController(org.apache.jmeter.control.LoopController)

Example 2 with LoopController

use of org.apache.jmeter.control.LoopController 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;
    }
}
Also used : Backend(org.apache.jmeter.visualizers.backend.Backend) Timer(org.apache.jmeter.timers.Timer) ThreadGroup(org.apache.jmeter.threads.ThreadGroup) AbstractThreadGroup(org.apache.jmeter.threads.AbstractThreadGroup) LoopController(org.apache.jmeter.control.LoopController)

Example 3 with LoopController

use of org.apache.jmeter.control.LoopController in project jmeter by apache.

the class LoopControlPanel method createTestElement.

/* Implements JMeterGUIComponent.createTestElement() */
@Override
public TestElement createTestElement() {
    LoopController lc = new LoopController();
    modifyTestElement(lc);
    return lc;
}
Also used : LoopController(org.apache.jmeter.control.LoopController)

Aggregations

LoopController (org.apache.jmeter.control.LoopController)3 LoopControlPanel (org.apache.jmeter.control.gui.LoopControlPanel)1 AbstractThreadGroup (org.apache.jmeter.threads.AbstractThreadGroup)1 ThreadGroup (org.apache.jmeter.threads.ThreadGroup)1 Timer (org.apache.jmeter.timers.Timer)1 Backend (org.apache.jmeter.visualizers.backend.Backend)1