fix(性能测试): 修复预热时间没有适配单位的bug

This commit is contained in:
Captain.B 2021-03-30 15:28:16 +08:00
parent 015c665bcf
commit d556c722ad
1 changed files with 4 additions and 0 deletions

View File

@ -701,9 +701,11 @@ public class JmeterDocumentParser implements DocumentParser {
switch (unit) { switch (unit) {
case "M": case "M":
duration = String.valueOf(Long.parseLong(duration) * 60); duration = String.valueOf(Long.parseLong(duration) * 60);
rampUp = String.valueOf(Long.parseLong(rampUp) * 60);
break; break;
case "H": case "H":
duration = String.valueOf(Long.parseLong(duration) * 60 * 60); duration = String.valueOf(Long.parseLong(duration) * 60 * 60);
rampUp = String.valueOf(Long.parseLong(rampUp) * 60 * 60);
break; break;
default: default:
break; break;
@ -804,9 +806,11 @@ public class JmeterDocumentParser implements DocumentParser {
switch (unit) { switch (unit) {
case "M": case "M":
hold = String.valueOf(Long.parseLong(hold) * 60); hold = String.valueOf(Long.parseLong(hold) * 60);
rampUp = String.valueOf(Long.parseLong(rampUp) * 60);
break; break;
case "H": case "H":
hold = String.valueOf(Long.parseLong(hold) * 60 * 60); hold = String.valueOf(Long.parseLong(hold) * 60 * 60);
rampUp = String.valueOf(Long.parseLong(rampUp) * 60 * 60);
break; break;
default: default:
break; break;