mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:03:22 +08:00
Formatting
This commit is contained in:
parent
a33deee9f3
commit
af5338f26e
@ -37,8 +37,9 @@ public class EhCacheStatisticsProvider implements CacheStatisticsProvider<EhCach
|
||||
statistics.setSize(ehCacheStatistics.getSize());
|
||||
Double hitRatio = ehCacheStatistics.cacheHitRatio();
|
||||
if (!hitRatio.isNaN()) {
|
||||
// ratio is calculated 'racily' and can drift marginally above unity, so we cap it here
|
||||
double sanitizedHitRatio = hitRatio > 1 ? 1 : hitRatio;
|
||||
// ratio is calculated 'racily' and can drift marginally above unity,
|
||||
// so we cap it here
|
||||
double sanitizedHitRatio = (hitRatio > 1 ? 1 : hitRatio);
|
||||
statistics.setHitRatio(sanitizedHitRatio);
|
||||
statistics.setMissRatio(1 - sanitizedHitRatio);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user