Search in sources :

Example 11 with AbstractGraphPanelChartElement

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

the class GraphRowPercentilesTest method testGetElement.

/**
 * Test of getElement method, of class GraphRowPercentiles.
 */
@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);
}
Also used : AbstractGraphPanelChartElement(kg.apc.charting.AbstractGraphPanelChartElement) GraphRowPercentiles(kg.apc.charting.rows.GraphRowPercentiles)

Example 12 with AbstractGraphPanelChartElement

use of kg.apc.charting.AbstractGraphPanelChartElement 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)

Example 13 with AbstractGraphPanelChartElement

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

the class GraphRowSumValuesTest method testGetElement.

/**
 * Test of getElement method, of class GraphRowSumValues.
 */
@Test
public void testGetElement() {
    System.out.println("getElement");
    long value = 100L;
    GraphRowSumValues instance = new GraphRowSumValues();
    AbstractGraphPanelChartElement expResult = new GraphPanelChartSumElement(10);
    instance.add(value, 10);
    instance.getElement(value);
    Assert.assertTrue(instance.getElement(value).getValue() == expResult.getValue());
}
Also used : GraphPanelChartSumElement(kg.apc.charting.elements.GraphPanelChartSumElement) AbstractGraphPanelChartElement(kg.apc.charting.AbstractGraphPanelChartElement)

Aggregations

AbstractGraphPanelChartElement (kg.apc.charting.AbstractGraphPanelChartElement)13 Entry (java.util.Map.Entry)5 GraphRowPercentiles (kg.apc.charting.rows.GraphRowPercentiles)4 GraphPanelChartAverageElement (kg.apc.charting.elements.GraphPanelChartAverageElement)3 GraphPanelChartExactElement (kg.apc.charting.elements.GraphPanelChartExactElement)2 GraphRowOverallAverages (kg.apc.charting.rows.GraphRowOverallAverages)2 BasicStroke (java.awt.BasicStroke)1 Stroke (java.awt.Stroke)1 GraphPanelChartSimpleElement (kg.apc.charting.elements.GraphPanelChartSimpleElement)1 GraphPanelChartSumElement (kg.apc.charting.elements.GraphPanelChartSumElement)1 GraphRowExactValues (kg.apc.charting.rows.GraphRowExactValues)1