refactor: 设置rps时长
This commit is contained in:
parent
9bd8a55f2e
commit
c6ceea74ab
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue