Search in sources :

Example 1 with GraphRowPercentiles

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

the class ResponseTimesPercentilesGui method add.

@Override
public void add(SampleResult res) {
    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);
}
Also used : GraphRowPercentiles(kg.apc.charting.rows.GraphRowPercentiles)

Example 2 with GraphRowPercentiles

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

the class GraphRowPercentilesTest method testGetMinX.

/**
 * Test of getMinX method, of class GraphRowPercentiles.
 */
@Test
public void testGetMinX() {
    System.out.println("getMinX");
    GraphRowPercentiles instance = new GraphRowPercentiles();
    long expResult = 0L;
    long result = instance.getMinX();
    Assert.assertEquals(expResult, result);
}
Also used : GraphRowPercentiles(kg.apc.charting.rows.GraphRowPercentiles)

Example 3 with GraphRowPercentiles

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

the class GraphRowPercentilesTest method testIterator_req1.

@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();
    Assert.assertNotNull(result);
    Assert.assertTrue(result.hasNext());
    int cnt = 0;
    while (result.hasNext()) {
        Entry<Long, AbstractGraphPanelChartElement> obj = result.next();
        Assert.assertNotNull(obj);
        // System.err.println(cnt + " " + obj.getValue().getValue());
        assertEquals(10, obj.getValue().getValue(), 0.01);
        cnt++;
    }
    Assert.assertEquals(expectedCount, cnt);
}
Also used : Entry(java.util.Map.Entry) AbstractGraphPanelChartElement(kg.apc.charting.AbstractGraphPanelChartElement) GraphRowPercentiles(kg.apc.charting.rows.GraphRowPercentiles)

Example 4 with GraphRowPercentiles

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

the class GraphRowPercentilesTest method testAddResponseTime.

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

Example 5 with GraphRowPercentiles

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

the class GraphRowPercentilesTest method testIterator_req2.

@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();
    Assert.assertNotNull(result);
    Assert.assertTrue(result.hasNext());
    int cnt = 0;
    while (result.hasNext()) {
        Entry<Long, AbstractGraphPanelChartElement> obj = result.next();
        Assert.assertNotNull(obj);
        // System.err.println(cnt + " " + obj.getValue().getValue());
        assertEquals(cnt < 500 ? 10 : 20, obj.getValue().getValue(), 0.01);
        cnt++;
    }
    Assert.assertEquals(expectedCount, cnt);
}
Also used : Entry(java.util.Map.Entry) AbstractGraphPanelChartElement(kg.apc.charting.AbstractGraphPanelChartElement) GraphRowPercentiles(kg.apc.charting.rows.GraphRowPercentiles)

Aggregations

GraphRowPercentiles (kg.apc.charting.rows.GraphRowPercentiles)11 AbstractGraphPanelChartElement (kg.apc.charting.AbstractGraphPanelChartElement)4 Entry (java.util.Map.Entry)3 Iterator (java.util.Iterator)1