Java 类org.springframework.boot.actuate.endpoint.CachePublicMetrics 实例源码

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:PublicMetricsAutoConfigurationTests.java   
@Test
public void autoCacheManager() {
    load(CacheConfiguration.class);
    CachePublicMetrics bean = this.context.getBean(CachePublicMetrics.class);
    Collection<Metric<?>> metrics = bean.metrics();
    assertMetrics(metrics, "cache.books.size", "cache.speakers.size");
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:PublicMetricsAutoConfigurationTests.java   
@Test
public void multipleCacheManagers() {
    load(MultipleCacheConfiguration.class);
    CachePublicMetrics bean = this.context.getBean(CachePublicMetrics.class);
    Collection<Metric<?>> metrics = bean.metrics();
    assertMetrics(metrics, "cache.books.size", "cache.second_speakers.size",
            "cache.first_speakers.size", "cache.users.size");
}
项目:spring-boot-concourse    文件:PublicMetricsAutoConfigurationTests.java   
@Test
public void autoCacheManager() {
    load(CacheConfiguration.class);
    CachePublicMetrics bean = this.context.getBean(CachePublicMetrics.class);
    Collection<Metric<?>> metrics = bean.metrics();
    assertMetrics(metrics, "cache.books.size", "cache.speakers.size");
}
项目:spring-boot-concourse    文件:PublicMetricsAutoConfigurationTests.java   
@Test
public void multipleCacheManagers() {
    load(MultipleCacheConfiguration.class);
    CachePublicMetrics bean = this.context.getBean(CachePublicMetrics.class);
    Collection<Metric<?>> metrics = bean.metrics();
    assertMetrics(metrics, "cache.books.size", "cache.second_speakers.size",
            "cache.first_speakers.size", "cache.users.size");
}
项目:contestparser    文件:PublicMetricsAutoConfigurationTests.java   
@Test
public void autoCacheManager() {
    load(CacheConfiguration.class);
    CachePublicMetrics bean = this.context.getBean(CachePublicMetrics.class);
    Collection<Metric<?>> metrics = bean.metrics();
    assertMetrics(metrics, "cache.books.size", "cache.speakers.size");
}
项目:contestparser    文件:PublicMetricsAutoConfigurationTests.java   
@Test
public void multipleCacheManagers() {
    load(MultipleCacheConfiguration.class);
    CachePublicMetrics bean = this.context.getBean(CachePublicMetrics.class);
    Collection<Metric<?>> metrics = bean.metrics();
    assertMetrics(metrics, "cache.books.size", "cache.second_speakers.size",
            "cache.first_speakers.size", "cache.users.size");
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:PublicMetricsAutoConfiguration.java   
@Bean
@ConditionalOnMissingBean
@ConditionalOnBean(CacheStatisticsProvider.class)
public CachePublicMetrics cachePublicMetrics() {
    return new CachePublicMetrics();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:PublicMetricsAutoConfigurationTests.java   
@Test
public void noCacheMetrics() {
    load();
    assertThat(this.context.getBeansOfType(CachePublicMetrics.class)).isEmpty();
}
项目:spring-boot-concourse    文件:PublicMetricsAutoConfiguration.java   
@Bean
@ConditionalOnMissingBean
@ConditionalOnBean(CacheStatisticsProvider.class)
public CachePublicMetrics cachePublicMetrics() {
    return new CachePublicMetrics();
}
项目:spring-boot-concourse    文件:PublicMetricsAutoConfigurationTests.java   
@Test
public void noCacheMetrics() {
    load();
    assertThat(this.context.getBeansOfType(CachePublicMetrics.class)).isEmpty();
}
项目:contestparser    文件:PublicMetricsAutoConfiguration.java   
@Bean
@ConditionalOnMissingBean
@ConditionalOnBean(CacheStatisticsProvider.class)
public CachePublicMetrics cachePublicMetrics() {
    return new CachePublicMetrics();
}
项目:contestparser    文件:PublicMetricsAutoConfigurationTests.java   
@Test
public void noCacheMetrics() {
    load();
    assertEquals(0, this.context.getBeansOfType(CachePublicMetrics.class).size());
}