Search in sources :

Example 6 with AbstractGraphRow

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

the class ThreadsStateOverTimeGui method addThreadGroupRecord.

private void addThreadGroupRecord(String threadGroupName, long time, int numThreads, long duration) {
    String labelAgg = "Overall Active Threads";
    AbstractGraphRow row = model.get(threadGroupName);
    AbstractGraphRow rowAgg = modelAggregate.get(labelAgg);
    if (row == null) {
        row = getNewRow(model, AbstractGraphRow.ROW_AVERAGES, threadGroupName, AbstractGraphRow.MARKER_SIZE_SMALL, false, false, false, true, true);
    }
    if (rowAgg == null) {
        rowAgg = getNewRow(modelAggregate, AbstractGraphRow.ROW_SIMPLE, labelAgg, AbstractGraphRow.MARKER_SIZE_SMALL, false, false, false, true, Color.RED, true);
    }
    row.add(time, numThreads);
    // rebuild is a heavy process, avoided if possible
    if (model.size() == 1) {
        log.debug(row.toString());
        log.debug(row.getElement(time).toString());
        rowAgg.add(time, row.getElement(time).getValue());
    } else {
        rowAgg.add(time, getAllThreadCount(time));
        // invalidate lastAggUpdateTime
        if (time < lastAggUpdateTime) {
            lastAggUpdateTime = time - duration;
        }
        if (time != lastAggUpdateTime) {
            rebuildAggRow((GraphRowSimple) rowAgg, time, duration);
        }
        lastAggUpdateTime = time;
    }
}
Also used : AbstractGraphRow(kg.apc.charting.AbstractGraphRow)

Example 7 with AbstractGraphRow

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

the class AbstractGraphPanelVisualizerTest method testGetNewRow_9args.

/**
 * Test of getNewRow method, of class AbstractGraphPanelVisualizer.
 */
@Test
public void testGetNewRow_9args() {
    System.out.println("getNewRow");
    ConcurrentSkipListMap<String, AbstractGraphRow> model = new ConcurrentSkipListMap<String, AbstractGraphRow>();
    int rowType = 0;
    String label = "";
    int markerSize = 0;
    boolean isBarRow = false;
    boolean displayLabel = false;
    boolean thickLines = false;
    boolean showInLegend = false;
    boolean canCompose = false;
    AbstractGraphPanelVisualizer instance = new AbstractGraphPanelVisualizerImpl();
    AbstractGraphRow result = instance.getNewRow(model, rowType, label, markerSize, isBarRow, displayLabel, thickLines, showInLegend, canCompose);
    assertNotNull(result);
}
Also used : AbstractGraphRow(kg.apc.charting.AbstractGraphRow) ConcurrentSkipListMap(java.util.concurrent.ConcurrentSkipListMap)

Example 8 with AbstractGraphRow

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

the class ChartRowsTableTest method testAddRow.

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

Example 9 with AbstractGraphRow

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

the class GraphPanelTest method setUp.

/**
 */
@Before
public void setUp() {
    instance = new GraphPanel();
    instance.getSettingsTab().add(new JSettingsPanel(new AbstractGraphPanelVisualizerImpl(), JSettingsPanel.GRADIENT_OPTION));
    instance.getGraphObject().setRows(new ConcurrentSkipListMap<String, AbstractGraphRow>());
}
Also used : AbstractGraphRow(kg.apc.charting.AbstractGraphRow) JSettingsPanel(kg.apc.jmeter.vizualizers.JSettingsPanel) Before(org.junit.Before)

Example 10 with AbstractGraphRow

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

AbstractGraphRow (kg.apc.charting.AbstractGraphRow)26 Test (org.junit.Test)5 DateTimeRenderer (kg.apc.charting.DateTimeRenderer)3 GraphRowAverages (kg.apc.charting.rows.GraphRowAverages)3 GraphRowExactValues (kg.apc.charting.rows.GraphRowExactValues)3 ConcurrentSkipListMap (java.util.concurrent.ConcurrentSkipListMap)2 GraphRowOverallAverages (kg.apc.charting.rows.GraphRowOverallAverages)2 HashSet (java.util.HashSet)1 GraphPanelChart (kg.apc.charting.GraphPanelChart)1 JMeterVariableEvaluator (kg.apc.jmeter.JMeterVariableEvaluator)1 JSettingsPanel (kg.apc.jmeter.vizualizers.JSettingsPanel)1 CollectionProperty (org.apache.jmeter.testelement.property.CollectionProperty)1 PropertyIterator (org.apache.jmeter.testelement.property.PropertyIterator)1 Before (org.junit.Before)1