Search in sources :

Example 16 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 17 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 18 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)

Example 19 with AbstractGraphRow

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

the class AbstractGraphPanelVisualizerTest method testGetNewRow_10args.

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

Example 20 with AbstractGraphRow

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

the class AbstractDynamicThreadGroupGui method updateChart.

protected void updateChart(AbstractDynamicThreadGroup atg) {
    double targetRate = atg.getTargetLevelAsDouble();
    long rampUp = atg.getRampUpSeconds();
    long holdFor = atg.getHoldSeconds();
    long stepsCount = atg.getStepsAsLong();
    double unitFactor = atg.getUnitFactor();
    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);
    double totalArrivals = 0;
    if (stepsCount > 0) {
        double stepSize = targetRate / (double) stepsCount;
        double stepLen = rampUp / (double) stepsCount;
        for (int n = 1; n <= stepsCount; n++) {
            double stepRate = stepSize * n;
            row.add(Math.round((n - 1) * stepLen * 1000), stepRate);
            row.add(Math.round(n * stepLen * 1000), stepRate);
            totalArrivals += stepLen * stepRate;
        }
    } else {
        row.add(rampUp * 1000, targetRate);
        totalArrivals += rampUp * targetRate / 2.0;
    }
    row.add((rampUp + holdFor) * 1000, targetRate);
    totalArrivals += holdFor * targetRate;
    totalArrivals /= unitFactor;
    previewChart.setxAxisLabelRenderer(new DateTimeRenderer(DateTimeRenderer.HHMMSS, 0));
    chartModel.put(getRowLabel(totalArrivals), row);
}
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