fix: 修复性能测试计算并发数的问题

--bug=1009785 --user=刘瑞斌 【性能测试】github#9571,线程组的并发用户数总和应该为开启的线程组的和,而不是所有的线程组 https://www.tapd.cn/55049933/s/1095072

Closes #9571
This commit is contained in:
CaptainB 2022-01-20 16:23:25 +08:00 committed by song-tianyang
parent 47b5bd8a0a
commit 27f1ffce5c
1 changed files with 16 additions and 6 deletions

View File

@ -143,19 +143,29 @@ public abstract class AbstractEngine implements Engine {
if (next instanceof List) { if (next instanceof List) {
List<Object> o = (List<Object>) next; List<Object> o = (List<Object>) next;
for (Object o1 : o) { for (Object o1 : o) {
if (StringUtils.equals(JSONObject.parseObject(o1.toString()).getString("deleted"), "true")) { JSONObject jsonObject = JSONObject.parseObject(o1.toString());
String key = jsonObject.getString("key");
if (StringUtils.equals(key, "deleted")) {
String value = jsonObject.getString("value");
if (StringUtils.equals(value, "true")) {
iterator.remove(); iterator.remove();
continue outer; continue outer;
} }
} }
}
for (Object o1 : o) { for (Object o1 : o) {
if (StringUtils.equals(JSONObject.parseObject(o1.toString()).getString("enabled"), "false")) { JSONObject jsonObject = JSONObject.parseObject(o1.toString());
String key = jsonObject.getString("key");
if (StringUtils.equals(key, "enabled")) {
String value = jsonObject.getString("value");
if (StringUtils.equals(value, "false")) {
iterator.remove(); iterator.remove();
continue outer; continue outer;
} }
} }
} }
} }
}
for (int i = 0; i < jsonArray.size(); i++) { for (int i = 0; i < jsonArray.size(); i++) {
if (jsonArray.get(i) instanceof List) { if (jsonArray.get(i) instanceof List) {