docs: public static Ehcache instrument(MetricRegistry registry, final Ehcache cache) {
  
          final String prefix = name(cache.getClass(), cache.getName());
          registry.register(name(prefix, "hits"),
                  (Gauge<Long>) () -> cache.getStatistics().cacheHitCount());
  
          registry.register(name(prefix, "in-memory-hits"),
                  (Gauge<Long>) () -> cache.getStatistics().localHeapHitCount());
  
          registry.register(name(prefix, "off-heap-hits"),
                  (Gauge<Long>) () -> cache.getStatistics().localOffHeapHitCount());
  
          registry.register(name(prefix, "on-disk-hits"),
                  (Gauge<Long>) () -> cache.getStatistics().localDiskHitCount());
  
          registry.register(name(prefix, "misses"),
                  (Gauge<Long>) () -> cache.getStatistics().cacheMissCount());
  
          registry.register(name(prefix, "in-memory-misses"),
                  (Gauge<Long>) () -> cache.getStatistics().localHeapMissCount());
  
          registry.register(name(prefix, "off-heap-misses"),
                  (Gauge<Long>) () -> cache.getStatistics().localOffHeapMissCount());
  
          registry.register(name(prefix, "on-disk-misses"),
                  (Gauge<Long>) () -> cache.getStatistics().localDiskMissCount());
  
          registry.register(name(prefix, "objects"),
                  (Gauge<Long>) () -> cache.getStatistics().getSize());
  
          registry.register(name(prefix, "in-memory-objects"),
                  (Gauge<Long>) () -> cache.getStatistics().getLocalHeapSize());
  
          registry.register(name(prefix, "off-heap-objects"),
                  (Gauge<Long>) () -> cache.getStatistics().getLocalOffHeapSize());
  
          registry.register(name(prefix, "on-disk-objects"),
                  (Gauge<Long>) () -> cache.getStatistics().getLocalDiskSize());
  
          registry.register(name(prefix, "mean-get-time"),
                  (Gauge<Double>) () -> cache.getStatistics().cacheGetOperation().latency().average().value());
  
          registry.register(name(prefix, "mean-search-time"),
                  (Gauge<Double>) () -> cache.getStatistics().cacheSearchOperation().latency().average().value());
  
          registry.register(name(prefix, "eviction-count"),
                  (Gauge<Long>) () -> cache.getStatistics().cacheEvictionOperation().count().value());
  
          registry.register(name(prefix, "searches-per-second"),
                  (Gauge<Double>) () -> cache.getStatistics().cacheSearchOperation().rate().value());
  
          registry.register(name(prefix, "writer-queue-size"),
                  (Gauge<Long>) () -> cache.getStatistics().getWriterQueueLength());
  
          return new InstrumentedEhcache(registry, cache);
      }