修改 仿真销毁的时候发送cgy时间,有个可能是空的
CI / Docker-Build (push) Successful in 2m33s Details

This commit is contained in:
tiger_zhou 2024-08-19 09:42:14 +08:00
parent e93171e958
commit 4f151fae4a
1 changed files with 6 additions and 4 deletions

View File

@ -122,10 +122,12 @@ public class CgyStatsService {
public void syncUserSimulationUsing(UserSimulationRecordEvent event) { public void syncUserSimulationUsing(UserSimulationRecordEvent event) {
UserSimulationRecord record = event.getRecord(); UserSimulationRecord record = event.getRecord();
CgyStatsBO cgyStatsBO = functionStatsMap.get(record.getFunctionId()); CgyStatsBO cgyStatsBO = functionStatsMap.get(record.getFunctionId());
cgyStatsBO.getVisitor().incrementAndGet(); if (Objects.nonNull(cgyStatsBO)) {
cgyStatsBO.getUserSet().add(record.getUserId()); cgyStatsBO.getVisitor().incrementAndGet();
cgyStatsBO.getDuration().addAndGet(record.getDuration()); cgyStatsBO.getUserSet().add(record.getUserId());
cgyStatsBO.getChange().set(true); cgyStatsBO.getDuration().addAndGet(record.getDuration());
cgyStatsBO.getChange().set(true);
}
} }
/** /**