Skip to content

Commit

Permalink
HHH-14690 Avoid fully resetting StatisticsImpl just after its constru…
Browse files Browse the repository at this point in the history
…ctor
  • Loading branch information
Sanne committed Jun 22, 2021
1 parent 3ea0484 commit e919019
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public StatisticsImpl(SessionFactoryImplementor sessionFactory) {
Statistics.DEFAULT_QUERY_STATISTICS_MAX_SIZE,
20
);
clear();
resetStartTime();
metamodel = sessionFactory.getMetamodel();
cache = sessionFactory.getCache();
cacheRegionPrefix = sessionFactoryOptions.getCacheRegionPrefix();
Expand Down Expand Up @@ -192,6 +192,10 @@ public void clear() {
queryPlanCacheHitCount.reset();
queryPlanCacheMissCount.reset();

resetStartTime();
}

private void resetStartTime() {
startTime = System.currentTimeMillis();
}

Expand Down

0 comments on commit e919019

Please sign in to comment.