HHH-14690 Avoid fully resetting StatisticsImpl just after its constructor

This commit is contained in:
Sanne Grinovero 2021-06-21 11:37:19 +01:00 committed by Sanne Grinovero
parent 3ea0484122
commit e91901946a
1 changed files with 5 additions and 1 deletions

View File

@ -122,7 +122,7 @@ public class StatisticsImpl implements StatisticsImplementor, Service, Manageabl
Statistics.DEFAULT_QUERY_STATISTICS_MAX_SIZE, Statistics.DEFAULT_QUERY_STATISTICS_MAX_SIZE,
20 20
); );
clear(); resetStartTime();
metamodel = sessionFactory.getMetamodel(); metamodel = sessionFactory.getMetamodel();
cache = sessionFactory.getCache(); cache = sessionFactory.getCache();
cacheRegionPrefix = sessionFactoryOptions.getCacheRegionPrefix(); cacheRegionPrefix = sessionFactoryOptions.getCacheRegionPrefix();
@ -192,6 +192,10 @@ public class StatisticsImpl implements StatisticsImplementor, Service, Manageabl
queryPlanCacheHitCount.reset(); queryPlanCacheHitCount.reset();
queryPlanCacheMissCount.reset(); queryPlanCacheMissCount.reset();
resetStartTime();
}
private void resetStartTime() {
startTime = System.currentTimeMillis(); startTime = System.currentTimeMillis();
} }