use of org.springframework.boot.actuate.cache.CacheStatisticsProvider in project spring-boot by spring-projects.
the class CacheStatisticsAutoConfigurationTests method baseCaffeineCacheStatistics.
@Test
public void baseCaffeineCacheStatistics() {
load(CaffeineCacheConfig.class);
CacheStatisticsProvider provider = this.context.getBean("caffeineCacheStatisticsProvider", CacheStatisticsProvider.class);
doTestCoreStatistics(provider, true);
}
use of org.springframework.boot.actuate.cache.CacheStatisticsProvider in project spring-boot by spring-projects.
the class CacheStatisticsAutoConfigurationTests method concurrentMapCacheStatistics.
@Test
public void concurrentMapCacheStatistics() {
load(ConcurrentMapConfig.class);
CacheStatisticsProvider provider = this.context.getBean("concurrentMapCacheStatisticsProvider", CacheStatisticsProvider.class);
Cache books = getCache("books");
CacheStatistics cacheStatistics = provider.getCacheStatistics(this.cacheManager, books);
assertCoreStatistics(cacheStatistics, 0L, null, null);
getOrCreate(books, "a", "b", "b", "a", "a");
CacheStatistics updatedCacheStatistics = provider.getCacheStatistics(this.cacheManager, books);
assertCoreStatistics(updatedCacheStatistics, 2L, null, null);
}
Aggregations