use of kg.apc.charting.elements.GraphPanelChartSumElement in project jmeter-plugins by undera.
the class GraphRowSumValues method add.
@Override
public void add(long xVal, double yVal) {
GraphPanelChartSumElement el;
if (values.containsKey(xVal)) {
el = values.get(xVal);
el.add(yVal);
yVal = el.getValue();
} else {
el = new GraphPanelChartSumElement(yVal);
values.put(xVal, el);
countX++;
}
super.add(xVal, yVal);
}
use of kg.apc.charting.elements.GraphPanelChartSumElement in project jmeter-plugins by undera.
the class GraphRowSumValuesTest method testGetElement.
/**
* Test of getElement method, of class GraphRowSumValues.
*/
@Test
public void testGetElement() {
System.out.println("getElement");
long value = 100L;
GraphRowSumValues instance = new GraphRowSumValues();
AbstractGraphPanelChartElement expResult = new GraphPanelChartSumElement(10);
instance.add(value, 10);
instance.getElement(value);
Assert.assertTrue(instance.getElement(value).getValue() == expResult.getValue());
}
use of kg.apc.charting.elements.GraphPanelChartSumElement in project jmeter-plugins by undera.
the class GraphRowSumValues method next.
public Entry<Long, AbstractGraphPanelChartElement> next() {
Entry<Long, GraphPanelChartSumElement> entry = iterator.next();
GraphPanelChartSumElement ret = entry.getValue();
// log.info("Rolling: " + entry.getKey() + " " + rollingSum);
ExactEntry retValue = null;
if (isRollingSum) {
rollingSum += ret.getValue();
retValue = new ExactEntry(entry.getKey(), new GraphPanelChartSumElement(rollingSum));
} else {
retValue = new ExactEntry(entry.getKey(), new GraphPanelChartSumElement(ret.getValue()));
}
return retValue;
}
Aggregations