Search in sources :

Example 21 with AbstractGraphRow

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

the class JMXMonGui method addJmxMonRecord.

private void addJmxMonRecord(String rowName, long time, double value) {
    AbstractGraphRow row = model.get(rowName);
    if (row == null) {
        row = getNewRow(model, AbstractGraphRow.ROW_AVERAGES, rowName, AbstractGraphRow.MARKER_SIZE_NONE, false, false, false, true, true);
    }
    row.add(time, value);
}
Also used : AbstractGraphRow(kg.apc.charting.AbstractGraphRow)

Example 22 with AbstractGraphRow

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

the class CompositeModelTest method testAddRow.

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

Example 23 with AbstractGraphRow

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

the class ResponseTimesDistributionGui method addThreadGroupRecord.

private void addThreadGroupRecord(String threadGroupName, long time, int granulation) {
    String aggLabel = "Overall Response Times";
    AbstractGraphRow row = model.get(threadGroupName);
    AbstractGraphRow rowAgg = modelAggregate.get(aggLabel);
    if (row == null) {
        row = getNewRow(model, AbstractGraphRow.ROW_SUM_VALUES, threadGroupName, AbstractGraphRow.MARKER_SIZE_NONE, true, false, false, true, false);
    }
    if (rowAgg == null) {
        rowAgg = getNewRow(modelAggregate, AbstractGraphRow.ROW_SUM_VALUES, aggLabel, AbstractGraphRow.MARKER_SIZE_NONE, true, false, false, true, Color.RED, false);
    }
    row.add(time, 1);
    row.setGranulationValue(granulation);
    rowAgg.add(time, 1);
    rowAgg.setGranulationValue(granulation);
}
Also used : AbstractGraphRow(kg.apc.charting.AbstractGraphRow)

Example 24 with AbstractGraphRow

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

the class DbMonGui method addDbMonRecord.

private void addDbMonRecord(String rowName, long time, double value) {
    AbstractGraphRow row = model.get(rowName);
    if (row == null) {
        row = getNewRow(model, AbstractGraphRow.ROW_AVERAGES, rowName, AbstractGraphRow.MARKER_SIZE_NONE, false, false, false, true, true);
    }
    row.add(time, value);
}
Also used : AbstractGraphRow(kg.apc.charting.AbstractGraphRow)

Example 25 with AbstractGraphRow

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

the class VariableThroughputTimerGui method updateChart.

private void updateChart(VariableThroughputTimer tg) {
    model.clear();
    chart.clearErrorMessage();
    AbstractGraphRow row = new GraphRowExactValues();
    row.setColor(Color.BLUE);
    row.setDrawLine(true);
    row.setMarkerSize(AbstractGraphRow.MARKER_SIZE_NONE);
    row.setDrawThickLines(true);
    long now = System.currentTimeMillis();
    int rowsCount = tableModel.getRowCount();
    row.add(now, 0);
    row.add(now, tg.getRPSForSecond(0).getLeft());
    int duration = 0;
    for (int i = 0; i < rowsCount; i++) {
        row.add(now + (duration + 1) * 1000, tg.getRPSForSecond(duration + 1).getLeft());
        int rowVal = getIntFromRow(i, 2);
        if (rowVal < 0) {
            chart.setErrorMessage("The values entered cannot be rendered in preview...");
            break;
        }
        duration = duration + rowVal;
        row.add(now + duration * 1000, tg.getRPSForSecond(duration).getLeft());
    }
    // -1 because row.add(thread.getStartTime() - 1, 0)
    chart.setxAxisLabelRenderer(new DateTimeRenderer(DateTimeRenderer.HHMMSS, now - 1));
    chart.setForcedMinX(now);
    model.put("Expected RPS", row);
    chart.invalidateCache();
    chart.repaint();
}
Also used : AbstractGraphRow(kg.apc.charting.AbstractGraphRow) DateTimeRenderer(kg.apc.charting.DateTimeRenderer) GraphRowExactValues(kg.apc.charting.rows.GraphRowExactValues)

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