use of org.apache.jmeter.testelement.property.FloatProperty in project jmeter by apache.
the class ThroughputController method getPercentThroughputAsFloat.
protected float getPercentThroughputAsFloat() {
JMeterProperty prop = getProperty(PERCENTTHROUGHPUT);
float retVal = 100;
if (prop instanceof FloatProperty) {
retVal = ((FloatProperty) prop).getFloatValue();
} else {
String valueString = prop.getStringValue();
try {
retVal = Float.parseFloat(valueString);
} catch (NumberFormatException e) {
log.warn("Error parsing '{}'", valueString, e);
}
}
return retVal;
}
Aggregations