cache.setSampledStatisticsEnabled(true);
cache.setStatisticsAccuracy(Statistics.STATISTICS_ACCURACY_NONE);
LiveCacheStatistics stat = cache.getLiveCacheStatistics();
// with 'stat' object, we can print/report all of following data
log.info( stat.getCacheHitCount() );
log.info( stat.getInMemoryHitCount() );
log.info( stat.getOffHeapHitCount() );
log.info( stat.getOnDiskHitCount() );
log.info( stat.getCacheMissCount() );
log.info( stat.getInMemoryMissCount() );
log.info( stat.getOffHeapMissCount() );
log.info( stat.getOnDiskMissCount() );
log.info( stat.getSize() );
log.info( stat.getInMemorySize() );
log.info( stat.getOffHeapSize() );
log.info( stat.getAverageSearchTime() );
Now I tried to find the counterpart in Ehcache 3.0.0 but couldn't figure it out. I tried to google the solution but cannot find the sample code.
Can anyone give me some hints here?
--
You received this message because you are subscribed to the Google Groups "ehcache-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ehcache-user...@googlegroups.com.
To post to this group, send email to ehcach...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ehcache-users/c9b2ac45-9026-4670-81b5-7b93e5e94f4d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Using ehcache 2.x, I was able to browse MBean of 'net.sf.ehcache':'net.sf.ehcache'
-> 'SampledCache'-> 'myCache'-> 'SampledCacheManager'-> 'myCacheManager'but switched to ehcache 3.0.0, I don't see 'org.ehcache' showing in my MBean browser.For viewing those statistics data through a MBean, I have to use 'javax.cache' bridge way in my coding (change code to use JSR107's date types)?Thanks in advance.
--
You received this message because you are subscribed to the Google Groups "ehcache-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ehcache-user...@googlegroups.com.
To post to this group, send email to ehcach...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ehcache-users/239d3be8-69d3-4d95-8765-003091c8c9ef%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ehcache-users/2a69ca5b-b17d-40ed-9da3-d8749a2cbfa4%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ehcache-users/875a9363-6c4e-44e4-aebb-16fb993af8bf%40googlegroups.com.