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);
}
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);
}
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);
}
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);
}
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);
}
Aggregations