use of org.apache.jmeter.testelement.property.CollectionProperty in project jmeter-plugins by undera.
the class UltimateThreadGroupTest method testSetData.
@Test
public void testSetData() {
System.out.println("setSchedule");
CollectionProperty prop = JMeterPluginsUtils.tableModelRowsToCollectionProperty(dataModel, UltimateThreadGroup.DATA_PROPERTY);
instance.setData(prop);
}
use of org.apache.jmeter.testelement.property.CollectionProperty in project jmeter-plugins by undera.
the class UltimateThreadGroupTest method testGetData.
@Test
public void testGetData() {
System.out.println("getSchedule");
CollectionProperty prop = JMeterPluginsUtils.tableModelRowsToCollectionProperty(dataModel, UltimateThreadGroup.DATA_PROPERTY);
instance.setData(prop);
JMeterProperty result = instance.getData();
assertFalse(result instanceof NullProperty);
assertEquals(prop.getStringValue(), result.getStringValue());
}
use of org.apache.jmeter.testelement.property.CollectionProperty in project jmeter-plugins by undera.
the class DbMonCollectorTest method testSetData.
/**
* Test of setData method, of class DbMonCollector.
*/
@Test
public void testSetData() {
System.out.println("setData");
CollectionProperty rows = new CollectionProperty();
DbMonCollector instance = new DbMonCollector();
instance.setData(rows);
}
use of org.apache.jmeter.testelement.property.CollectionProperty in project jmeter-plugins by undera.
the class FreeFormArrivalsThreadGroup method setData.
public void setData(PowerTableModel model) {
CollectionProperty prop = JMeterPluginsUtils.tableModelRowsToCollectionProperty(model, SCHEDULE);
setProperty(prop);
}
use of org.apache.jmeter.testelement.property.CollectionProperty in project jmeter-plugins by undera.
the class FreeFormArrivalsThreadStarter method getCurrentRate.
@Override
protected double getCurrentRate() {
CollectionProperty data = arrivalsTG.getData();
PropertyIterator it = data.iterator();
int offset = 0;
while (it.hasNext()) {
CollectionProperty record = (CollectionProperty) it.next();
double chunkLen = record.get(2).getDoubleValue() * arrivalsTG.getUnitFactor();
double timeProgress = this.rollingTime / 1000.0 - startTime;
double chunkProgress = (timeProgress - offset) / chunkLen;
offset += chunkLen;
if (timeProgress <= offset) {
double chunkStart = record.get(0).getDoubleValue() / arrivalsTG.getUnitFactor();
double chunkEnd = record.get(1).getDoubleValue() / arrivalsTG.getUnitFactor();
double chunkHeight = chunkEnd - chunkStart;
return chunkStart + chunkProgress * chunkHeight;
}
}
log.info("Got no further schedule, can stop now");
return -1;
}
Aggregations