Removed incorrect statistics calculation for regularQueryInvocationCnt/regularQueryInvocationTime

This commit is contained in:
Volodymyr Babak 2021-12-28 16:22:18 +02:00
parent 584681465b
commit 38b37a6eef

View File

@ -74,11 +74,7 @@ public abstract class TbAbstractDataSubCtx<T extends AbstractDataQuery<? extends
@Override @Override
protected synchronized void update() { protected synchronized void update() {
long start = System.currentTimeMillis();
PageData<EntityData> newData = findEntityData(); PageData<EntityData> newData = findEntityData();
long end = System.currentTimeMillis();
stats.getRegularQueryInvocationCnt().incrementAndGet();
stats.getRegularQueryTimeSpent().addAndGet(end - start);
Map<EntityId, EntityData> oldDataMap; Map<EntityId, EntityData> oldDataMap;
if (data != null && !data.getData().isEmpty()) { if (data != null && !data.getData().isEmpty()) {
oldDataMap = data.getData().stream().collect(Collectors.toMap(EntityData::getEntityId, Function.identity(), (a, b) -> a)); oldDataMap = data.getData().stream().collect(Collectors.toMap(EntityData::getEntityId, Function.identity(), (a, b) -> a));