fix(性能测试): 修复指定聚合时间后清空该值不生效的问题

This commit is contained in:
CaptainB 2022-11-16 10:23:24 +08:00 committed by 刘瑞斌
parent ba22b7c7f7
commit 87498a4f10
1 changed files with 1 additions and 1 deletions

View File

@ -835,7 +835,7 @@ public class PerformanceTestService {
try {
LoadTestReportWithBLOBs report = loadTestReportMapper.selectByPrimaryKey(reportId);
Map advancedConfig = JSON.parseObject(report.getAdvancedConfiguration(), Map.class);
if (advancedConfig.get("granularity") != null) {
if (advancedConfig.get("granularity") != null && StringUtils.isNotEmpty(advancedConfig.get("granularity").toString())) {
return (int) advancedConfig.get("granularity") * 1000;// 单位是ms
}
AtomicReference<Integer> maxDuration = new AtomicReference<>(0);