Search in sources :

Example 1 with GraphPanelChartSimpleElement

use of kg.apc.charting.elements.GraphPanelChartSimpleElement in project jmeter-plugins by undera.

the class ThreadsStateOverTimeGui method rebuildAggRow.

// 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 {
            key = -1;
        }
    }
}
Also used : GraphPanelChartSimpleElement(kg.apc.charting.elements.GraphPanelChartSimpleElement)

Example 2 with GraphPanelChartSimpleElement

use of kg.apc.charting.elements.GraphPanelChartSimpleElement in project jmeter-plugins by undera.

the class GraphRowSimple method add.

/**
 * @param xVal
 * @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);
}
Also used : GraphPanelChartSimpleElement(kg.apc.charting.elements.GraphPanelChartSimpleElement)

Example 3 with GraphPanelChartSimpleElement

use of kg.apc.charting.elements.GraphPanelChartSimpleElement in project jmeter-plugins by undera.

the class GraphRowSimpleTest method testGetElement.

/**
 * Test of getElement method, of class GraphRowSimple.
 */
@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);
    Assert.assertTrue(result.getValue() == expResult.getValue());
}
Also used : GraphPanelChartSimpleElement(kg.apc.charting.elements.GraphPanelChartSimpleElement) AbstractGraphPanelChartElement(kg.apc.charting.AbstractGraphPanelChartElement)

Aggregations

GraphPanelChartSimpleElement (kg.apc.charting.elements.GraphPanelChartSimpleElement)3 AbstractGraphPanelChartElement (kg.apc.charting.AbstractGraphPanelChartElement)1