 
 (defrecord RequestOrContext [values queue stack])
 
-(def +items+ 100)
+(def +items+ 10)
 
 (defn expected! [x]
   (assert (= (range +items+) (:values x))))

        map-request {}
        record-request (map->RequestOrContext map-request)]

    ;; 10.8 µs
    (title "middleware - map")
    (expected! (app map-request))
    (cc/quick-bench
      (app map-request))

    ;; 4.7 µs
    (title "middleware - record")
    (expected! (app record-request))
    (cc/quick-bench
      (app record-request))

    (title "middleware - dynamic")
    (expected! ((middleware/chain mw identity) record-request))
    (cc/quick-bench


(defn interceptor-chain-test []
  (let [interceptors (map (fn [value] [interceptor value]) (range +items+))
        app-reduce (executor-reduce (interceptor/chain interceptors identity {}))
        app-queue (executor-queue (interceptor/chain interceptors identity {}))
        app-ctx-queue (executor-ctx-queue (interceptor/chain interceptors identity {}))
        request {}]

    ;; 2000ns
    (title "interceptors - reduce")
    (expected! (app-reduce request))
    (cc/quick-bench
      (app-reduce request))

    ;; 2500ns
    (title "interceptors - queue")
    (expected! (app-queue request))
    (cc/quick-bench
      (app-queue request))

    ;; 3200ns
    (title "interceptors - ctx-queue")
    (expected! (app-ctx-queue request))
    (cc/quick-bench
