Search in sources :

Example 1 with JCacheGaugeSet

use of com.codahale.metrics.jcache.JCacheGaugeSet in project metrics by dropwizard.

the class JCacheGaugeSetTest method setUp.

@Before
public void setUp() throws Exception {
    CachingProvider provider = Caching.getCachingProvider();
    cacheManager = provider.getCacheManager(getClass().getResource("ehcache.xml").toURI(), getClass().getClassLoader());
    myCache = cacheManager.getCache("myCache");
    myOtherCache = cacheManager.getCache("myOtherCache");
    registry = new MetricRegistry();
    registry.register("jcache.statistics", new JCacheGaugeSet());
}
Also used : MetricRegistry(com.codahale.metrics.MetricRegistry) JCacheGaugeSet(com.codahale.metrics.jcache.JCacheGaugeSet) CachingProvider(javax.cache.spi.CachingProvider) Before(org.junit.Before)

Aggregations

MetricRegistry (com.codahale.metrics.MetricRegistry)1 JCacheGaugeSet (com.codahale.metrics.jcache.JCacheGaugeSet)1 CachingProvider (javax.cache.spi.CachingProvider)1 Before (org.junit.Before)1