Search in sources :

Example 1 with GraphRowOverallAverages

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

the class ThroughputVsThreadsGui method add.

@Override
public void add(SampleResult res) {
    if (!isSampleIncluded(res)) {
        return;
    }
    long time = res.getTime();
    if (time < 1) {
        return;
    }
    super.add(res);
    String label = res.getSampleLabel();
    String averageLabel = "Average " + res.getSampleLabel();
    GraphRowAverages row = (GraphRowAverages) model.get(label);
    GraphRowOverallAverages avgRow = (GraphRowOverallAverages) model.get(averageLabel);
    if (row == null || avgRow == null) {
        row = (GraphRowAverages) getNewRow(model, AbstractGraphRow.ROW_AVERAGES, label, AbstractGraphRow.MARKER_SIZE_SMALL, false, false, false, true, false);
        avgRow = (GraphRowOverallAverages) getNewRow(model, AbstractGraphRow.ROW_OVERALL_AVERAGES, averageLabel, AbstractGraphRow.MARKER_SIZE_BIG, false, true, false, false, row.getColor(), false);
    }
    int allThreads = getCurrentThreadCount(res);
    double throughput = (double) allThreads * 1000.0d / time;
    row.add(allThreads, throughput);
    avgRow.add(allThreads, throughput);
    graphPanel.getGraphObject().setCurrentX(allThreads);
    updateGui(null);
}
Also used : GraphRowAverages(kg.apc.charting.rows.GraphRowAverages) GraphRowOverallAverages(kg.apc.charting.rows.GraphRowOverallAverages)

Example 2 with GraphRowOverallAverages

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

the class GraphRowOverallAveragesTest method testGetValue.

/**
 * Test of getValue method, of class GraphRowOverallAverages.
 */
@Test
public void testGetValue() {
    System.out.println("getValue");
    GraphRowOverallAverages instance = new GraphRowOverallAverages();
    GraphPanelChartAverageElement result = instance.getValue();
    assertEquals(0, result.getValue(), 0.01);
}
Also used : GraphRowOverallAverages(kg.apc.charting.rows.GraphRowOverallAverages) GraphPanelChartAverageElement(kg.apc.charting.elements.GraphPanelChartAverageElement)

Example 3 with GraphRowOverallAverages

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

the class GraphRowOverallAveragesTest method testGetKey.

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

Example 4 with GraphRowOverallAverages

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

the class ChartRowsTableTest method testAddRow2.

/**
 * Test of addRow method, of class ChartRowsTable.
 */
@Test
public void testAddRow2() {
    System.out.println("addRow");
    AbstractGraphRow row = new GraphRowOverallAverages();
    ChartRowsTable instance = new ChartRowsTable(null);
    instance.addRow(row);
}
Also used : AbstractGraphRow(kg.apc.charting.AbstractGraphRow) GraphRowOverallAverages(kg.apc.charting.rows.GraphRowOverallAverages) Test(org.junit.Test)

Example 5 with GraphRowOverallAverages

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

the class GraphPanelTest method testAddRow.

/**
 * Test of addRow method, of class GraphPanel.
 */
@Test
public void testAddRow() {
    System.out.println("addRow");
    AbstractGraphRow row = new GraphRowOverallAverages();
    instance.addRow(row);
}
Also used : AbstractGraphRow(kg.apc.charting.AbstractGraphRow) GraphRowOverallAverages(kg.apc.charting.rows.GraphRowOverallAverages) Test(org.junit.Test)

Aggregations

GraphRowOverallAverages (kg.apc.charting.rows.GraphRowOverallAverages)14 GraphPanelChartAverageElement (kg.apc.charting.elements.GraphPanelChartAverageElement)3 AbstractGraphPanelChartElement (kg.apc.charting.AbstractGraphPanelChartElement)2 AbstractGraphRow (kg.apc.charting.AbstractGraphRow)2 GraphRowAverages (kg.apc.charting.rows.GraphRowAverages)2 Test (org.junit.Test)2 Iterator (java.util.Iterator)1