code: public static InstrumentedExecutorService newCachedThreadPool(
              ThreadFactory threadFactory, MetricRegistry registry) {
          return new InstrumentedExecutorService(Executors.newCachedThreadPool(threadFactory), registry);
      }
docs: Creates an instrumented thread pool that creates new threads as needed, but
  will reuse previously constructed threads when they are
  available, and uses the provided
  ThreadFactory to create new threads when needed.
  
  @param threadFactory the factory to use when creating new threads
  @param registry      the {@link MetricRegistry} that will contain the metrics.
  @return the newly created thread pool
  @throws NullPointerException if threadFactory is null
  @see Executors#newCachedThreadPool(ThreadFactory)