Package kg.apc.charting.rows

Examples of kg.apc.charting.rows.GraphRowOverallAverages


        String label = res.getSampleLabel();
        String averageLabel = "Average " + res.getSampleLabel();
        String aggLabel = "Overall Response Times";
        String avgAggLabel = "Average " + aggLabel;
        GraphRowAverages row = (GraphRowAverages) model.get(label);
        GraphRowOverallAverages avgRow = (GraphRowOverallAverages) model.get(averageLabel);
        GraphRowAverages rowAgg = (GraphRowAverages) modelAggregate.get(aggLabel);
        GraphRowOverallAverages avgRowAgg = (GraphRowOverallAverages) modelAggregate.get(avgAggLabel);

        if (row == null || avgRow == null) {
            row = (GraphRowAverages) getNewRow(model, AbstractGraphRow.ROW_AVERAGES, label, AbstractGraphRow.MARKER_SIZE_SMALL, false, false, false, true, false);
            avgRow = (GraphRowOverallAverages) getNewRow(model, AbstractGraphRow.ROW_OVERALL_AVERAGES, averageLabel, AbstractGraphRow.MARKER_SIZE_BIG, false, true, false, false, row.getColor(), false);
        }

        if (rowAgg == null || avgRowAgg == null) {
            rowAgg = (GraphRowAverages) getNewRow(modelAggregate, AbstractGraphRow.ROW_AVERAGES, aggLabel, AbstractGraphRow.MARKER_SIZE_SMALL, false, false, false, true, Color.RED, false);
            avgRowAgg = (GraphRowOverallAverages) getNewRow(modelAggregate, AbstractGraphRow.ROW_OVERALL_AVERAGES, avgAggLabel, AbstractGraphRow.MARKER_SIZE_BIG, false, true, false, false, Color.RED, false);
        }

        int threadsCount = getCurrentThreadCount(res);

        row.add(threadsCount, res.getTime());
        avgRow.add(threadsCount, res.getTime());
        rowAgg.add(threadsCount, res.getTime());
        avgRowAgg.add(threadsCount, res.getTime());

        graphPanel.getGraphObject().setCurrentX(res.getAllThreads());
        updateGui(null);
    }
View Full Code Here


        super.add(res);

        String label = res.getSampleLabel();
        String averageLabel = "Average " + res.getSampleLabel();
        GraphRowAverages row = (GraphRowAverages) model.get(label);
        GraphRowOverallAverages avgRow = (GraphRowOverallAverages) model.get(averageLabel);

        if(row == null || avgRow == null)
        {
            row = (GraphRowAverages) getNewRow(model, AbstractGraphRow.ROW_AVERAGES, label, AbstractGraphRow.MARKER_SIZE_SMALL , false, false, false, true, false);
            avgRow = (GraphRowOverallAverages) getNewRow(model, AbstractGraphRow.ROW_OVERALL_AVERAGES, averageLabel, AbstractGraphRow.MARKER_SIZE_BIG , false, true, false, false, row.getColor(), false);
        }

        int allThreads = getCurrentThreadCount(res);
        double throughput = (double) allThreads * 1000.0d / time;
        row.add(allThreads, throughput);
        avgRow.add(allThreads, throughput);
        graphPanel.getGraphObject().setCurrentX(allThreads);
        updateGui(null);
    }
View Full Code Here

    */
   @Test
   public void testAdd()
   {
      System.out.println("add");
      GraphRowOverallAverages instance = new GraphRowOverallAverages();
      instance.add(0, 0);
      assertEquals(0, instance.getKey(), 0.01);
      assertEquals(0, instance.getValue().getValue(), 0.01);

      instance.add(1, 1);
      assertEquals(1, instance.getKey(), 0.01);
      assertEquals(0.5, instance.getValue().getValue(), 0.01);

      instance.add(1, 1);
      assertEquals(1, instance.getKey(), 0.01);
      assertEquals(0.66, instance.getValue().getValue(), 0.01);

      instance.add(5, 10);
      assertEquals(2, instance.getKey(), 0.01);
      assertEquals(3, instance.getValue().getValue(), 0.01);
   }
View Full Code Here

    */
   @Test
   public void testIterator()
   {
      System.out.println("iterator");
      GraphRowOverallAverages instance = new GraphRowOverallAverages();
      Iterator expResult = instance;
      Iterator result = instance.iterator();
      assertEquals(expResult, result);
   }
View Full Code Here

    */
   @Test
   public void testHasNext()
   {
      System.out.println("hasNext");
      GraphRowOverallAverages instance = new GraphRowOverallAverages();
      assertTrue(instance.hasNext());
      assertEquals(instance, instance.next());
      assertFalse(instance.hasNext());
   }
View Full Code Here

    */
   @Test
   public void testNext()
   {
      System.out.println("next");
      GraphRowOverallAverages instance = new GraphRowOverallAverages();
      assertEquals(instance, instance.next());
   }
View Full Code Here

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

    */
   @Test
   public void testGetKey()
   {
      System.out.println("getKey");
      GraphRowOverallAverages instance = new GraphRowOverallAverages();
      long expResult = 0;
      long result = instance.getKey();
      assertEquals(expResult, result);
   }
View Full Code Here

    */
   @Test
   public void testGetValue()
   {
      System.out.println("getValue");
      GraphRowOverallAverages instance = new GraphRowOverallAverages();
      GraphPanelChartAverageElement result = instance.getValue();
      assertEquals(0, result.getValue(), 0.01);
   }
View Full Code Here

   @Test
   public void testSetValue()
   {
      System.out.println("setValue");
      GraphPanelChartAverageElement value = null;
      GraphRowOverallAverages instance = new GraphRowOverallAverages();
      try
      {
         AbstractGraphPanelChartElement result = instance.setValue(value);
         fail("Exception expected");
      }
      catch (UnsupportedOperationException e)
      {
      }
View Full Code Here

TOP

Related Classes of kg.apc.charting.rows.GraphRowOverallAverages

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.