Search in sources :

Example 1 with CachePublicMetrics

use of org.springframework.boot.actuate.endpoint.CachePublicMetrics in project spring-boot by spring-projects.

the class PublicMetricsAutoConfigurationTests method autoCacheManager.

@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");
}
Also used : CachePublicMetrics(org.springframework.boot.actuate.endpoint.CachePublicMetrics) Metric(org.springframework.boot.actuate.metrics.Metric) Test(org.junit.Test)

Example 2 with CachePublicMetrics

use of org.springframework.boot.actuate.endpoint.CachePublicMetrics in project spring-boot by spring-projects.

the class PublicMetricsAutoConfigurationTests method multipleCacheManagers.

@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");
}
Also used : CachePublicMetrics(org.springframework.boot.actuate.endpoint.CachePublicMetrics) Metric(org.springframework.boot.actuate.metrics.Metric) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)2 CachePublicMetrics (org.springframework.boot.actuate.endpoint.CachePublicMetrics)2 Metric (org.springframework.boot.actuate.metrics.Metric)2