Merge pull request #5787 from volodymyr-babak/fix-for-sub-stats

[3.3.3] Removed incorrect statistics calculation for regularQueryInvocationCnt/regularQueryInvocationTime
This commit is contained in:
Andrew Shvayka 2021-12-28 18:06:00 +02:00 committed by GitHub
commit f47c8be40d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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