Search in sources :

Example 1 with AbstractGraphRow

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

the class AbstractMonitoringVisualizer method addMonitoringRecord.

protected void addMonitoringRecord(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 2 with AbstractGraphRow

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

the class AbstractVsThreadVisualizer method addCount.

private void addCount(String tgName, int nbThread, long time) {
    AbstractGraphRow row = state.get(tgName);
    if (row == null) {
        row = getNewRow(state, AbstractGraphRow.ROW_AVERAGES, tgName, AbstractGraphRow.MARKER_SIZE_NONE, false, false, false, false, Color.BLACK, false);
        state.put(tgName, row);
    }
    row.add(time - time % PRECISION_MS, nbThread);
}
Also used : AbstractGraphRow(kg.apc.charting.AbstractGraphRow)

Example 3 with AbstractGraphRow

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

the class CompositeModelTest method testGetRow.

/**
 * Test of getRow method, of class CompositeModel.
 */
@Test
public void testGetRow() {
    System.out.println("getRow");
    String testName = "";
    String rowName = "";
    CompositeModel instance = new CompositeModel();
    instance.setNotifier(notifier);
    AbstractGraphRow result = instance.getRow(testName, rowName);
    assertNull(result);
    instance.addRow(rowName, new GraphRowAverages());
    result = instance.getRow(testName, rowName);
    assertNotNull(result);
}
Also used : AbstractGraphRow(kg.apc.charting.AbstractGraphRow) GraphRowAverages(kg.apc.charting.rows.GraphRowAverages) Test(org.junit.Test)

Example 4 with AbstractGraphRow

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

the class FreeFormArrivalsThreadGroupGui method updateChart.

protected void updateChart(AbstractDynamicThreadGroup tg) {
    FreeFormArrivalsThreadGroup atg = (FreeFormArrivalsThreadGroup) tg;
    CollectionProperty data = atg.getData();
    chartModel.clear();
    previewChart.clearErrorMessage();
    AbstractGraphRow row = new GraphRowExactValues();
    row.setColor(getRowColor());
    row.setDrawLine(true);
    row.setMarkerSize(AbstractGraphRow.MARKER_SIZE_NONE);
    row.setDrawThickLines(true);
    // initial value to force min Y
    row.add(0, 0);
    JMeterVariableEvaluator evaluator = new JMeterVariableEvaluator();
    int offset = 0;
    double totalArrivals = 0;
    PropertyIterator it = data.iterator();
    while (it.hasNext()) {
        CollectionProperty record = (CollectionProperty) it.next();
        double from = evaluator.getDouble(record.get(0));
        double to = evaluator.getDouble(record.get(1));
        double during = evaluator.getDouble(record.get(2));
        row.add(offset * 1000, from);
        offset += during * tg.getUnitFactor();
        row.add(offset * 1000, to);
        totalArrivals += during * from + during * (to - from) / 2;
    }
    previewChart.setxAxisLabelRenderer(new DateTimeRenderer(DateTimeRenderer.HHMMSS, 0));
    chartModel.put(getRowLabel(totalArrivals), row);
}
Also used : AbstractGraphRow(kg.apc.charting.AbstractGraphRow) CollectionProperty(org.apache.jmeter.testelement.property.CollectionProperty) DateTimeRenderer(kg.apc.charting.DateTimeRenderer) PropertyIterator(org.apache.jmeter.testelement.property.PropertyIterator) JMeterVariableEvaluator(kg.apc.jmeter.JMeterVariableEvaluator) GraphRowExactValues(kg.apc.charting.rows.GraphRowExactValues)

Example 5 with AbstractGraphRow

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

the class PageDataExtractorOverTimeGui method addRecord.

private void addRecord(String label, long time, double value) {
    if (!isSampleIncluded(label)) {
        return;
    }
    AbstractGraphRow row = model.get(label);
    if (row == null) {
        row = getNewRow(model, AbstractGraphRow.ROW_AVERAGES, label, AbstractGraphRow.MARKER_SIZE_SMALL, false, false, false, true, true);
    }
    row.add(time, value);
}
Also used : AbstractGraphRow(kg.apc.charting.AbstractGraphRow)

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