   (:import [java.util.concurrent Executors ExecutorService
                                  ScheduledExecutorService ThreadFactory
                                  TimeUnit]
-           java.util.concurrent.atomic.AtomicInteger))
+           java.util.concurrent.atomic.AtomicInteger
+           [com.codahale.metrics
+            InstrumentedExecutorService
+            InstrumentedScheduledExecutorService
+            InstrumentedThreadFactory
+            SharedMetricRegistries]))
 
 
 (defn- create-thread-factory



(def ^ExecutorService dispatch-pool
  (Executors/newCachedThreadPool
   (create-thread-factory dispatch-pool-thread-format
                          dispatch-pool-thread-counter)))


(defn dispatch



(def ^ScheduledExecutorService scheduled-pool
  (let [registry (SharedMetricRegistries/getOrCreate "github-bot-app")]
    (InstrumentedScheduledExecutorService.
     (Executors/newSingleThreadScheduledExecutor
      (InstrumentedThreadFactory.
       (create-thread-factory scheduled-pool-thread-format
                              scheduled-pool-thread-counter
                              true)
       registry
       "github-bot-app-scheduled-threads"))
     registry
     "github-bot-app-scheduled-pool")))

(defn schedule
  [^Long delay ^TimeUnit time-unit ^Runnable r]
