Package kg.apc.charting.elements

Examples of kg.apc.charting.elements.GraphPanelChartSimpleElement


     * @param yVal
     */
    @Override
    public void add(long xVal, double yVal)
    {
        GraphPanelChartSimpleElement el;
        if (values.containsKey(xVal))
        {
            el = (GraphPanelChartSimpleElement) values.get(xVal);
            el.add(yVal);
        } else
        {
            el = new GraphPanelChartSimpleElement(yVal);
            values.put(xVal, el);
        }

        super.add(xVal, yVal);
    }
View Full Code Here


    @Test
    public void testGetElement()
    {
        System.out.println("getElement");
        long value = 100L;
        AbstractGraphPanelChartElement expResult = new GraphPanelChartSimpleElement(10);
        instance.add(value, 10);
        AbstractGraphPanelChartElement result = instance.getElement(value);
        assertTrue(result.getValue() == expResult.getValue());
    }
View Full Code Here

    //perf fix: only process elements between time and last processed - sampler duration
    private void rebuildAggRow(GraphRowSimple row, long time, long duration) {
        long key = row.getHigherKey(lastAggUpdateTime - duration - 1);
        while (key < time && key != -1) {
            GraphPanelChartSimpleElement elt = (GraphPanelChartSimpleElement) row.getElement(key);
            elt.add(getAllThreadCount(key));

            Long nextKey = row.getHigherKey(key);
            if (nextKey != null) {
                key = nextKey;
            } else {
View Full Code Here

    @Test
    public void testAdd()
    {
        System.out.println("add");
        double yVal = 0.0;
        GraphPanelChartSimpleElement instance = new GraphPanelChartSimpleElement();
        instance.add(yVal);
    }
View Full Code Here

     */
    @Test
    public void testGetValue()
    {
        System.out.println("getValue");
        GraphPanelChartSimpleElement instance = new GraphPanelChartSimpleElement();
        instance.add(1);
        instance.add(2);
        double expResult = 2.0;
        double result = instance.getValue();
        assertEquals(expResult, result, 0.0);
    }
View Full Code Here

TOP

Related Classes of kg.apc.charting.elements.GraphPanelChartSimpleElement

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.