refactor: 设置rps时长

This commit is contained in:
Captain.B 2021-01-06 16:14:11 +08:00
parent 9bd8a55f2e
commit c6ceea74ab
1 changed files with 2 additions and 9 deletions

View File

@ -972,15 +972,8 @@ public class JmeterDocumentParser implements DocumentParser {
} }
private void processVariableThroughputTimer(Element variableThroughputTimer) { private void processVariableThroughputTimer(Element variableThroughputTimer) {
Object durations = context.getProperty("duration"); // 设置rps时长
Integer duration; Integer duration = Integer.MAX_VALUE;
if (durations instanceof List) {
Object o = ((List<?>) durations).get(0);
duration = (Integer) o;
((List<?>) durations).remove(0);
} else {
duration = (Integer) durations;
}
Object rpsLimits = context.getProperty("rpsLimit"); Object rpsLimits = context.getProperty("rpsLimit");
String rpsLimit; String rpsLimit;
if (rpsLimits instanceof List) { if (rpsLimits instanceof List) {