HHH-14690 Avoid fully resetting StatisticsImpl just after its constructor
This commit is contained in:
parent
3ea0484122
commit
e91901946a
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue