use of kg.apc.charting.rows.GraphRowOverallAverages in project jmeter-plugins by undera.
the class TimesVsThreadsGui method add.
@Override
public void add(SampleResult res) {
if (!isSampleIncluded(res)) {
return;
}
super.add(res);
String label = res.getSampleLabel();
String averageLabel = "Average " + res.getSampleLabel();
String aggLabel = "Overall Response Times";
String avgAggLabel = "Average " + aggLabel;
GraphRowAverages row = (GraphRowAverages) model.get(label);
GraphRowOverallAverages avgRow = (GraphRowOverallAverages) model.get(averageLabel);
GraphRowAverages rowAgg = (GraphRowAverages) modelAggregate.get(aggLabel);
GraphRowOverallAverages avgRowAgg = (GraphRowOverallAverages) modelAggregate.get(avgAggLabel);
if (row == null || avgRow == null) {
row = (GraphRowAverages) getNewRow(model, AbstractGraphRow.ROW_AVERAGES, label, AbstractGraphRow.MARKER_SIZE_SMALL, false, false, false, true, false);
avgRow = (GraphRowOverallAverages) getNewRow(model, AbstractGraphRow.ROW_OVERALL_AVERAGES, averageLabel, AbstractGraphRow.MARKER_SIZE_BIG, false, true, false, false, row.getColor(), false);
}
if (rowAgg == null || avgRowAgg == null) {
rowAgg = (GraphRowAverages) getNewRow(modelAggregate, AbstractGraphRow.ROW_AVERAGES, aggLabel, AbstractGraphRow.MARKER_SIZE_SMALL, false, false, false, true, Color.RED, false);
avgRowAgg = (GraphRowOverallAverages) getNewRow(modelAggregate, AbstractGraphRow.ROW_OVERALL_AVERAGES, avgAggLabel, AbstractGraphRow.MARKER_SIZE_BIG, false, true, false, false, Color.RED, false);
}
int threadsCount = getCurrentThreadCount(res);
row.add(threadsCount, res.getTime());
avgRow.add(threadsCount, res.getTime());
rowAgg.add(threadsCount, res.getTime());
avgRowAgg.add(threadsCount, res.getTime());
graphPanel.getGraphObject().setCurrentX(res.getAllThreads());
updateGui(null);
}
use of kg.apc.charting.rows.GraphRowOverallAverages in project jmeter-plugins by undera.
the class GraphRowOverallAveragesTest method testSize.
@Test
public void testSize() {
System.out.println("size");
GraphRowOverallAverages instance = new GraphRowOverallAverages();
int expResult = 1;
int result = instance.size();
Assert.assertEquals(expResult, result);
}
use of kg.apc.charting.rows.GraphRowOverallAverages in project jmeter-plugins by undera.
the class GraphRowOverallAveragesTest method testAdd.
/**
* Test of add method, of class GraphRowOverallAverages.
*/
@Test
public void testAdd() {
System.out.println("add");
GraphRowOverallAverages instance = new GraphRowOverallAverages();
instance.add(0, 0);
assertEquals(0, instance.getKey(), 0.01);
assertEquals(0, instance.getValue().getValue(), 0.01);
instance.add(1, 1);
assertEquals(1, instance.getKey(), 0.01);
assertEquals(0.5, instance.getValue().getValue(), 0.01);
instance.add(1, 1);
assertEquals(1, instance.getKey(), 0.01);
assertEquals(0.66, instance.getValue().getValue(), 0.01);
instance.add(5, 10);
assertEquals(2, instance.getKey(), 0.01);
assertEquals(3, instance.getValue().getValue(), 0.01);
}
use of kg.apc.charting.rows.GraphRowOverallAverages in project jmeter-plugins by undera.
the class GraphRowOverallAveragesTest method testHasNext.
/**
* Test of hasNext method, of class GraphRowOverallAverages.
*/
@Test
public void testHasNext() {
System.out.println("hasNext");
GraphRowOverallAverages instance = new GraphRowOverallAverages();
Assert.assertTrue(instance.hasNext());
assertEquals(instance, instance.next());
Assert.assertFalse(instance.hasNext());
}
use of kg.apc.charting.rows.GraphRowOverallAverages in project jmeter-plugins by undera.
the class GraphRowOverallAveragesTest method testRemove.
/**
* Test of remove method, of class GraphRowOverallAverages.
*/
@Test
public void testRemove() {
System.out.println("remove");
GraphRowOverallAverages instance = new GraphRowOverallAverages();
try {
instance.remove();
Assert.fail("Exception expected");
} catch (UnsupportedOperationException e) {
}
}
Aggregations