Skip to content

Commit ac96e3a

Browse files
committed
Stat/StatisticsImpl.cs: queryExecutionMaxTime should be zero, not negative, before first query. And include the full value in the log message. NH-3577.
1 parent 8e283dd commit ac96e3a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/NHibernate/Stat/StatisticsImpl.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ public void Clear()
336336

337337
queryExecutionCount = 0;
338338
queryCacheHitCount = 0;
339-
queryExecutionMaxTime = TimeSpan.MinValue;
339+
queryExecutionMaxTime = TimeSpan.Zero;
340340
queryExecutionMaxTimeQueryString = null;
341341
queryCacheMissCount = 0;
342342
queryCachePutCount = 0;
@@ -451,7 +451,7 @@ public void LogSummary()
451451
log.Info("query cache puts: " + queryCachePutCount);
452452
log.Info("query cache hits: " + queryCacheHitCount);
453453
log.Info("query cache misses: " + queryCacheMissCount);
454-
log.Info("max query time: " + queryExecutionMaxTime.Milliseconds + "ms");
454+
log.Info("max query time: " + queryExecutionMaxTime.TotalMilliseconds.ToString("0") + " ms");
455455
}
456456

457457
public TimeSpan OperationThreshold

0 commit comments

Comments
 (0)