~severeoverfl0w/ring-graph

2fbca7d25c6a164c140f9de837059c071ca5cb27 — Dominic Monroe 15 days ago 4d59cbc
Add new adapters
M ring-heap/deps.edn => ring-heap/deps.edn +3 -1
@@ 6,4 6,6 @@
                             :exclusions [metosin/sieppari metosin/reitit-core io.vertx/vertx-web-client]}
        org.immutant/web {:mvn/version "2.1.10"}
        luminus/ring-undertow-adapter {:mvn/version "1.1.2"}
        org.slf4j/slf4j-nop {:mvn/version "1.7.30"}}}
        org.slf4j/slf4j-nop {:mvn/version "1.7.30"}
        com.github.pipijn/ring-http-exchange {:git/url "https://github.com/pepijn/ring-http-exchange.git"
                                              :sha "edfba30dba3fd6200fc3a6ad0888be5c95eea3f4"}}}

A ring-heap/src/dominic/jetty_async.clj => ring-heap/src/dominic/jetty_async.clj +11 -0
@@ 0,0 1,11 @@
(ns dominic.jetty-async
  (:require
    [ring.adapter.jetty :refer :all]))

(defn app [req res raise]
  (res {:status  200
        :headers {"Content-Type" "text/html"}
        :body    "hello HTTP!"}))

(defn -main [& args]
  (run-jetty app {:port 8080 :async? true}))

A ring-heap/src/dominic/ring_http_exchange.clj => ring-heap/src/dominic/ring_http_exchange.clj +11 -0
@@ 0,0 1,11 @@
(ns dominic.ring-http-exchange
  (:require [ring-http-exchange.core :refer [run-http-server]]))

(defn app [req]
  {:status  200
   :headers {"Content-Type" "text/html"}
   :body    "hello HTTP!"})

(defn -main [& args]
  (run-http-server app {:port 8080})
  #_@(promise))

A ring-heap/src/dominic/undertow_async.clj => ring-heap/src/dominic/undertow_async.clj +10 -0
@@ 0,0 1,10 @@
(ns dominic.undertow-async
  (:require [ring.adapter.undertow :refer [run-undertow]]))

(defn app [req res raise]
  (res {:status  200
        :headers {"Content-Type" "text/html"}
        :body    "hello HTTP!"}))

(defn -main [& args]
  (run-undertow app {:port 8080}))

M src/io/dominic/ring_graph/core.clj => src/io/dominic/ring_graph/core.clj +4 -1
@@ 106,11 106,14 @@
          (let [matrix (for [arg heap-sizes
                             main ["dominic.aleph"
                                   "dominic.jetty"
                                   "dominic.jetty-async"
                                   "dominic.vertx"
                                   "dominic.pohjavirta"
                                   "dominic.httpkit"
                                   "dominic.immutant"
                                   "dominic.undertow"]]
                                   "dominic.undertow"
                                   "dominic.undertow-async"
                                   "dominic.ring-http-exchange"]]
                         [arg main])]
            (send-off state* assoc :matrix matrix)
            (doseq [[arg main] matrix]