Examples of ThreadGroup


Examples of org.apache.jmeter.threads.ThreadGroup

  {
  }

  public void save(Saveable s, Writer out) throws java.io.IOException
  {
    ThreadGroup save = (ThreadGroup)s;
    out.write("<ThreadGroup name=\"");
    out.write(JMeterHandler.convertToXML(save.getName()));
    out.write("\" numThreads=\"");
    out.write(""+save.getNumThreads());
    out.write("\">\n");
    JMeterHandler.writeControllers(((GenericController)
        save.getSamplerController()).getSubControllers(),out);
    JMeterHandler.writeConfigElements(((GenericController)
        save.getSamplerController()).getConfigElements(),out);
    JMeterHandler.writeTimers(save.getTimers(),out);
    JMeterHandler.writeListeners(save.getListeners(),out);
    out.write("</ThreadGroup>\n");
  }
View Full Code Here

Examples of org.apache.jmeter.threads.ThreadGroup

    out.write("</ThreadGroup>\n");
  }

  public void setAtts(Attributes atts) throws java.lang.Exception
  {
    group = new ThreadGroup();
    group.setName(atts.getValue("name"));
    try
    {
      group.setNumThreads(Integer.parseInt(atts.getValue("numThreads")));
    }
View Full Code Here

Examples of org.apache.jmeter.threads.ThreadGroup

    int groupCount = 0;
        JMeterContextService.clearTotalThreads();
        startingGroups = true;
    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

    int groupCount = 0;
        JMeterContextService.clearTotalThreads();
        startingGroups = true;
    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

        init();
        initGui();
    }

    public TestElement createTestElement() {
        ThreadGroup tg = new ThreadGroup();
        modifyTestElement(tg);
        return tg;
    }
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

    schcdule_run = true;
    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

        int groupCount = 0;
        JMeterContextService.clearTotalThreads();
        startingGroups = true;
        while (running && iter.hasNext()) {// for each thread group
            groupCount++;
            ThreadGroup group = (ThreadGroup) iter.next();
            int numThreads = group.getNumThreads();
            JMeterContextService.addTotalThreads(numThreads);
            boolean onErrorStopTest = group.getOnErrorStopTest();
            boolean onErrorStopTestNow = group.getOnErrorStopTestNow();
            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

      guiPackage = GuiPackage.getInstance();
      Collection groups = TestPlan.createTestPlan(null).compileTestPlan();
      engine = new ReflectionJMeterEngine();
      for (Iterator i = groups.iterator(); i.hasNext();)
      {
        ThreadGroup tg = (ThreadGroup) i.next();
        if (log.isDebugEnabled())
        {
          log.debug("actionPerformed1 : threadgroup - " + tg);
        }
        engine.addThreadGroup(tg);
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.