fix(性能测试): 修复报告label中有重复内容导致排序错误的问题

This commit is contained in:
CaptainB 2023-05-13 14:27:30 +08:00
parent 1de6f5401a
commit 6f2183769a
1 changed files with 1 additions and 1 deletions

View File

@ -241,7 +241,7 @@ public class PerformanceReportService {
List<LoadTestExportJmx> jmxContent = getJmxContent(id);
String jmx = jmxContent.get(0).getJmx();
// 按照JMX顺序重新排序
statistics.sort(Comparator.comparingInt(a -> jmx.indexOf(a.getLabel())));
statistics.sort(Comparator.comparingInt(a -> jmx.indexOf("\"" + a.getLabel() + "\"")));
// total 放到最后
List<Statistics> total = statistics.stream()
.filter(r -> StringUtils.equalsAnyIgnoreCase(r.getLabel(), "Total"))