-
-
Save bsless/18d79130479d94ce0256d53a78b31c64 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require '[sieppari.queue :as q]) | |
(require '[sieppari.core :as s]) | |
(require '[clj-async-profiler.core :as prof]) | |
(require '[criterium.core :as cc]) | |
(def +items+ 10) | |
(def interceptors (conj (mapv (fn [value] {:enter identity}) (range +items+)) identity)) | |
(def queue (q/into-queue interceptors)) | |
(def map-request {}) | |
(defrecord RequestOrContext [values queue stack]) | |
(def record-request (map->RequestOrContext map-request)) | |
(def app (fn [req] (s/execute queue req))) | |
(app record-request) | |
(cc/quick-bench (app record-request)) | |
;; (prof/clear-results) | |
(prof/serve-files 7777) | |
(prof/profile | |
(time (dotimes [_ 1e7] (app record-request)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment