Examples of ThreadGroup


Examples of org.apache.jmeter.threads.ThreadGroup

        return null;
    }

    public TestElement createTestElement()
    {
        ThreadGroup tg = new ThreadGroup();
        modifyTestElement(tg);
        return tg;
    }
View Full Code Here

Examples of org.apache.jmeter.threads.ThreadGroup

        schcdule_run = true;
        JMeterContextService.getContext().setSamplingStarted(true);
        int groupCount = 1;
        while (iter.hasNext())
        {
            ThreadGroup group = (ThreadGroup) iter.next();
            threads = new JMeterThread[group.getNumThreads()];
            log.info("Starting " + threads.length + " test threads");
            for (int i = 0; running && i < threads.length; i++)
            {
                ListedHashTree threadGroupTree =
                    (ListedHashTree) searcher.getSubTree(group);
                threadGroupTree.add(group, testLevelElements);
                threads[i] =
                    new JMeterThread(
                        cloneTree(threadGroupTree),
                        this,
                        notifier);
                threads[i].setThreadNum(i);
                threads[i].setInitialContext(JMeterContextService.getContext());
                threads[i].setInitialDelay(
                    (int) (((float) (group.getRampUp() * 1000)
                        / (float) group.getNumThreads())
                        * (float) i));
                threads[i].setThreadName(group.getName() + (groupCount++) + "-" + (i + 1));

                scheduleThread(threads[i], group);

                Thread newThread = new Thread(threads[i]);
                newThread.setName(threads[i].getThreadName());
View Full Code Here

Examples of org.apache.jmeter.threads.ThreadGroup

        return null;
    }

    public TestElement createTestElement()
    {
        ThreadGroup tg = new ThreadGroup();
        modifyTestElement(tg);
        return tg;
    }
View Full Code Here

Examples of org.apache.jmeter.threads.ThreadGroup

        init();
        initGui();
    }

    public TestElement createTestElement() {
        ThreadGroup tg = new ThreadGroup();
        modifyTestElement(tg);
        return tg;
    }
View Full Code Here

Examples of org.apache.jmeter.threads.ThreadGroup

        init();
        initGui();
    }

    public TestElement createTestElement() {
        ThreadGroup tg = new ThreadGroup();
        modifyTestElement(tg);
        return tg;
    }
View Full Code Here

Examples of org.apache.jmeter.threads.ThreadGroup

        JMeterContextService.getContext().setSamplingStarted(true);
        int groupCount = 0;
        while (iter.hasNext())
        {
          groupCount++;
            ThreadGroup group = (ThreadGroup) iter.next();
      int numThreads = group.getNumThreads();
      boolean onErrorStopTest = group.getOnErrorStopTest();
      boolean onErrorStopThread = group.getOnErrorStopThread();
      String groupName = group.getName();
      int rampUp = group.getRampUp();
      float perThreadDelay = ((float) (rampUp * 1000) / (float) numThreads);
            threads = new JMeterThread[numThreads];
     
            log.info("Starting " + numThreads + " threads for group "+ groupName
                + ". Ramp up = "+ rampUp + ".");
View Full Code Here

Examples of org.apache.jmeter.threads.ThreadGroup

  public Collection getMenuCategories() {
    return null;
  }

  public TestElement createTestElement() {
    ThreadGroup tg = new ThreadGroup();
    modifyTestElement(tg);
    return tg;
  }
View Full Code Here

Examples of org.apache.jmeter.threads.ThreadGroup

    JMeterContextService.getContext().setSamplingStarted(true);
    int groupCount = 0;
        JMeterContextService.clearTotalThreads();
    while (iter.hasNext()) {
      groupCount++;
      ThreadGroup group = (ThreadGroup) iter.next();
      int numThreads = group.getNumThreads();
            JMeterContextService.addTotalThreads(numThreads);
      boolean onErrorStopTest = group.getOnErrorStopTest();
      boolean onErrorStopThread = group.getOnErrorStopThread();
      String groupName = group.getName();
      int rampUp = group.getRampUp();
      float perThreadDelay = ((float) (rampUp * 1000) / (float) numThreads);
      log.info("Starting " + numThreads + " threads for group " + groupName + ". Ramp up = " + rampUp + ".");

      if (onErrorStopTest) {
        log.info("Test will stop on error");
View Full Code Here

Examples of org.apache.jmeter.threads.ThreadGroup

        HashTree hashtree = new HashTree();
        hashtree.add(new LoopController());
        JMeterThread thread = new JMeterThread(hashtree, monitor, null);
        thread.setThreadName("test thread");
        JMeterContextService.getContext().setThread(thread);
        ThreadGroup threadGroup = new org.apache.jmeter.threads.ThreadGroup();
        threadGroup.setName("test thread group");
        JMeterContextService.getContext().setThreadGroup(threadGroup);
        JMeterUtils.setProperty("sample_variables", "TEST1,TEST2,TEST3"); // for Flexible File Writer Test       
    }
View Full Code Here

Examples of org.apache.jmeter.threads.ThreadGroup

        saveConfiguration.setTime(true);
        saveConfiguration.setTimestamp(true);
        resultCollector.setSaveConfig(saveConfiguration);

        // Thread Group
        ThreadGroup threadGroup = new ThreadGroup();
        threadGroup.setName("xwiki");
        threadGroup.setNumThreads(1);
        threadGroup.setRampUp(1);
        LoopController loopCtrl = new LoopController();
        loopCtrl.setLoops(5);
        loopCtrl.setFirst(true);
        threadGroup.setSamplerController((LoopController) loopCtrl);

        HashTree threadGroupTree = new HashTree();
        threadGroupTree.add(samplers);

        // Test plan
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.