 ;; some cases if care is not taken.
 
 (defrecord MeteredBlockStore
-  [store label record-event]
+  [store label recording-fn]
 
   store/BlockStore
 

      ProxyOutputStream)))


; TODO: dynamic context var


;; ## Stream Metering

              []
              (let [[last-time sum] @meter
                    elapsed (/ (- (System/nanoTime) last-time) 1e9)
                    record! (:recording-fn store)
                    label (meter-label store)]
                (log/tracef "Metered %s of %s block %s: %s (%s)"
                            (name metric-type) label block-id
                            (format-bytes sum "B")
                            (format-bytes (/ sum elapsed) "Bps"))
                (record!
                  store
                  {:type metric-type
                   :label label
                   :block block-id
                   :value sum})
                (vreset! [(System/nanoTime) 0])))]
