Package kg.apc.charting.rows

Examples of kg.apc.charting.rows.GraphRowSumValues$ExactEntry


    }

    private void updateChart(UltimateThreadGroup tg) {
        tg.testStarted();
        model.clear();
        GraphRowSumValues row = new GraphRowSumValues();
        row.setColor(Color.RED);
        row.setDrawLine(true);
        row.setMarkerSize(AbstractGraphRow.MARKER_SIZE_NONE);
        row.setDrawThickLines(true);

        final HashTree hashTree = new HashTree();
        hashTree.add(new LoopController());
        JMeterThread thread = new JMeterThread(hashTree, null, null);

        long now = System.currentTimeMillis();

        chart.setxAxisLabelRenderer(new DateTimeRenderer(DateTimeRenderer.HHMMSS, now - 1)); //-1 because row.add(thread.getStartTime() - 1, 0)
        chart.setForcedMinX(now);

        row.add(now, 0);

        // users in
        int numThreads = tg.getNumThreads();
        log.debug("Num Threads: " + numThreads);
        for (int n = 0; n < numThreads; n++) {
            thread.setThreadNum(n);
            thread.setThreadName(Integer.toString(n));
            tg.scheduleThread(thread, now);
            row.add(thread.getStartTime() - 1, 0);
            row.add(thread.getStartTime(), 1);
        }

        tg.testStarted();
        // users out
        for (int n = 0; n < tg.getNumThreads(); n++) {
            thread.setThreadNum(n);
            thread.setThreadName(Integer.toString(n));
            tg.scheduleThread(thread, now);
            row.add(thread.getEndTime() - 1, 0);
            row.add(thread.getEndTime(), -1);
        }

        model.put("Expected parallel users count", row);
        chart.invalidateCache();
        chart.repaint();
View Full Code Here


            case AbstractGraphRow.ROW_OVERALL_AVERAGES:
                return new GraphRowOverallAverages();
            case AbstractGraphRow.ROW_PERCENTILES:
                return new GraphRowPercentiles();
            case AbstractGraphRow.ROW_SUM_VALUES:
                return new GraphRowSumValues(false);
            case AbstractGraphRow.ROW_ROLLING_SUM_VALUES:
                return new GraphRowSumValues(true);
            case AbstractGraphRow.ROW_SIMPLE:
                return new GraphRowSimple();
            default:
                return null;
        }
View Full Code Here

    }

    private void updateChart(SteppingThreadGroup tg) {
        model.clear();

        GraphRowSumValues row = new GraphRowSumValues();
        row.setColor(Color.RED);
        row.setDrawLine(true);
        row.setMarkerSize(AbstractGraphRow.MARKER_SIZE_NONE);
        row.setDrawThickLines(true);

        final HashTree hashTree = new HashTree();
        hashTree.add(new LoopController());
        JMeterThread thread = new JMeterThread(hashTree, null, null);

        long now = System.currentTimeMillis();

        // test start
        chart.setxAxisLabelRenderer(new DateTimeRenderer(DateTimeRenderer.HHMMSS, now - 1)); //-1 because row.add(thread.getStartTime() - 1, 0)
        row.add(now, 0);
        row.add(now + tg.getThreadGroupDelayAsInt(), 0);

        int numThreads = tg.getNumThreads();

        // users in
        for (int n = 0; n < numThreads; n++) {
            thread.setThreadNum(n);
            tg.scheduleThread(thread, now);
            row.add(thread.getStartTime() - 1, 0);
            row.add(thread.getStartTime(), 1);
        }

        // users out
        for (int n = 0; n < numThreads; n++) {
            thread.setThreadNum(n);
            tg.scheduleThread(thread, now);
            row.add(thread.getEndTime() - 1, 0);
            row.add(thread.getEndTime(), -1);
        }

        model.put("Expected Active Users Count", row);
        chart.invalidateCache();
        chart.repaint();
View Full Code Here

   @Test
   public void testAdd()
   {
      System.out.println("add");
      long xVal = 0L;
      GraphRowSumValues instance = new GraphRowSumValues();
      instance.add(xVal, 1);
      instance.add(xVal, 2);
      instance.add(xVal, 3);
   }
View Full Code Here

   @Test
   public void testIterator()
   {
      System.out.println("iterator");
      System.out.println("iterator");
      GraphRowSumValues instance = new GraphRowSumValues();
      instance.add(1, 1);
      instance.add(1, 2);
      instance.add(1, 3);
      Iterator<Entry<Long, AbstractGraphPanelChartElement>> result = instance.iterator();
      assertEquals(6, ((AbstractGraphPanelChartElement) result.next().getValue()).getValue(), 0.001);
   }
View Full Code Here

    */
   @Test
   public void testHasNext()
   {
      System.out.println("hasNext");
      GraphRowSumValues instance = new GraphRowSumValues();
      Iterator it = instance.iterator();
      boolean expResult = false;
      boolean result = it.hasNext();
      assertEquals(expResult, result);
   }
View Full Code Here

    */
   @Test
   public void testNext()
   {
      System.out.println("next");
      GraphRowSumValues instance = new GraphRowSumValues();
      instance.add(1, 1);
      Iterator<Entry<Long, AbstractGraphPanelChartElement>> it = instance.iterator();
      Entry result = it.next();
      assertNotNull(result);
   }
View Full Code Here

    */
   @Test
   public void testRemove()
   {
      System.out.println("remove");
      GraphRowSumValues instance = new GraphRowSumValues();
      try
      {
         instance.remove();
         fail("Exception expected");
      }
      catch (UnsupportedOperationException e)
      {
      }
View Full Code Here

   @Test
   public void testSize()
   {
      System.out.println("size");
      GraphRowSumValues instance = new GraphRowSumValues();
      int expResult = 0;
      int result = instance.size();
      assertEquals(expResult, result);
   }
View Full Code Here

    @Test
    public void testSetExcludeOutOfRangeValues()
    {
        System.out.println("setExcludeOutOfRangeValues");
        boolean excludeOutOfRangeValues = true;
        GraphRowSumValues instance = new GraphRowSumValues();
        instance.setExcludeOutOfRangeValues(excludeOutOfRangeValues);
    }
View Full Code Here

TOP

Related Classes of kg.apc.charting.rows.GraphRowSumValues$ExactEntry

Copyright © 2018 www.massapicom. 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.