Package kg.apc.charting.rows

Examples of kg.apc.charting.rows.GraphRowPercentiles


        if (!isSampleIncluded(res)) {
            return;
        }
        String label = res.getSampleLabel();
        String aggregateLabel = "Overall Response Times";
        GraphRowPercentiles row = (GraphRowPercentiles) model.get(label);
        GraphRowPercentiles rowAgg = (GraphRowPercentiles) modelAggregate.get(label);

        if (row == null) {
            row = (GraphRowPercentiles) getNewRow(model, AbstractGraphRow.ROW_PERCENTILES, label, AbstractGraphRow.MARKER_SIZE_NONE, false, false, false, true, false);
        }

        if (rowAgg == null) {
            rowAgg = (GraphRowPercentiles) getNewRow(modelAggregate, AbstractGraphRow.ROW_PERCENTILES, aggregateLabel, AbstractGraphRow.MARKER_SIZE_NONE, false, false, false, true, Color.RED, false);
        }

        row.add(res.getTime(), 1);
        rowAgg.add(res.getTime(), 1);
        updateGui(null);
    }
View Full Code Here


            case AbstractGraphRow.ROW_EXACT_VALUES:
                return new GraphRowExactValues();
            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:
View Full Code Here

     */
    @Test
    public void testAddResponseTime() {
        System.out.println("addResponseTime");
        long respTime = 1234L;
        GraphRowPercentiles instance = new GraphRowPercentiles();
        instance.add(respTime, 1);
        int expResult = expectedCount;
        int result = instance.size();
        assertEquals(expResult, result);
    }
View Full Code Here

     * Test of iterator method, of class GraphRowPercentiles.
     */
    @Test
    public void testIterator() {
        System.out.println("iterator");
        GraphRowPercentiles instance = new GraphRowPercentiles();
        Iterator result = instance.iterator();
        assertNotNull(result);
        assertTrue(result.hasNext());
        int cnt = 0;
        while (result.hasNext()) {
            assertNotNull(result.next());
View Full Code Here

    }

    @Test
    public void testIterator_req1() {
        System.out.println("iterator 1req");
        GraphRowPercentiles instance = new GraphRowPercentiles();
        instance.add(10, 1);
        instance.add(10, 1);
        Iterator<Entry<Long, AbstractGraphPanelChartElement>> result = instance.iterator();
        assertNotNull(result);
        assertTrue(result.hasNext());
        int cnt = 0;
        while (result.hasNext()) {
            Entry<Long, AbstractGraphPanelChartElement> obj = result.next();
View Full Code Here

    }

    @Test
    public void testIterator_req2() {
        System.out.println("iterator 2req");
        GraphRowPercentiles instance = new GraphRowPercentiles();
        instance.add(10, 1);
        instance.add(20, 1);
        Iterator<Entry<Long, AbstractGraphPanelChartElement>> result = instance.iterator();
        assertNotNull(result);
        assertTrue(result.hasNext());
        int cnt = 0;
        while (result.hasNext()) {
            Entry<Long, AbstractGraphPanelChartElement> obj = result.next();
View Full Code Here

    }

    @Test
    public void testIterator_req3() {
        System.out.println("iterator 3req");
        GraphRowPercentiles instance = new GraphRowPercentiles();

        for (int n = 0; n < expectedCount; n++) {
            instance.add(n, 1);
        }
       
        Iterator<Entry<Long, AbstractGraphPanelChartElement>> result = instance.iterator();
        assertNotNull(result);
        assertTrue(result.hasNext());
        int cnt = 0;
        while (result.hasNext()) {
            Entry<Long, AbstractGraphPanelChartElement> obj = result.next();
View Full Code Here

     * Test of size method, of class GraphRowPercentiles.
     */
    @Test
    public void testSize() {
        System.out.println("size");
        GraphRowPercentiles instance = new GraphRowPercentiles();
        int expResult = 0;
        int result = instance.size();
        assertEquals(expResult, result);
        instance.add(1234L, 1);
        expResult = expectedCount;
        result = instance.size();
        assertEquals(expResult, result);
    }
View Full Code Here

    @Test
    public void testGetElement() {
        System.out.println("getElement");

        long value = 500L;
        GraphRowPercentiles instance = new GraphRowPercentiles();
        for (int i = 0; i < expectedCount; i++) {
            instance.add(i, i);
        }

        assertEquals(expectedCount, instance.size());

        //force percentile calculation
        instance.iterator();

        AbstractGraphPanelChartElement result = instance.getElement(value);

        assertEquals(32, result.getValue(), 0.001);
    }
View Full Code Here

    @Test
    public void testAdd() {
        System.out.println("add");
        long xVal = 0L;
        double yVal = 0.0;
        GraphRowPercentiles instance = new GraphRowPercentiles();
        instance.add(xVal, yVal);
    }
View Full Code Here

TOP

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

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.