Last active
August 29, 2015 14:02
-
-
Save ysasaki/af2572fd5593b87501de to your computer and use it in GitHub Desktop.
compojure + httpkitのhello, worldのbenchmark
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
yosasaki@SPC-072 devel% boom -n 10000 -c 200 http://localhost:5000/ | |
10000 / 10000 Boooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo! 100.00 % | |
Summary: | |
Total: 0.5068 secs. | |
Slowest: 0.0462 secs. | |
Fastest: 0.0033 secs. | |
Average: 0.0099 secs. | |
Requests/sec: 19732.5997 | |
Total Data Received: 110000 bytes. | |
Response Size per Request: 11 bytes. | |
Status code distribution: | |
[200] 10000 responses | |
Response time histogram: | |
0.003 [1] | | |
0.008 [992] |∎∎∎∎ | |
0.012 [8082] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎ | |
0.016 [671] |∎∎∎ | |
0.020 [54] | | |
0.025 [0] | | |
0.029 [18] | | |
0.033 [8] | | |
0.038 [31] | | |
0.042 [129] | | |
0.046 [14] | | |
Latency distribution: | |
10% in 0.0076 secs. | |
25% in 0.0085 secs. | |
50% in 0.0091 secs. | |
75% in 0.0100 secs. | |
90% in 0.0114 secs. | |
95% in 0.0152 secs. | |
99% in 0.0394 secs. |
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
(ns heroku-test.handler | |
(:gen-class) | |
(:use compojure.core) | |
(:require [compojure.handler :as handler] | |
[compojure.route :as route] | |
[org.httpkit.server :as httpkit :only [run-server]])) | |
(defroutes app-routes | |
(GET "/" [] "Hello World") | |
(route/resources "/") | |
(route/not-found "Not Found")) | |
(def app | |
(handler/site app-routes)) | |
(defn -main [port] | |
(httpkit/run-server app {:port (Integer. port)})) |
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
(defproject heroku-test "0.1.0-SNAPSHOT" | |
:description "FIXME: write description" | |
:url "http://example.com/FIXME" | |
:dependencies [[org.clojure/clojure "1.5.1"] | |
[compojure "1.1.6"] | |
[http-kit "2.1.16"] | |
[ring "1.3.0"]] | |
:plugins [[lein-ring "0.8.10"]] | |
:min-lein-version "2.0.0" | |
:uberjar-name "heroku-test-standalone.jar" | |
:ring {:handler heroku-test.handler/app} | |
:main heroku-test.handler | |
:aot :all | |
:profiles | |
{:dev {:dependencies [[javax.servlet/servlet-api "2.5"] | |
[ring-mock "0.1.5"]]} | |
:uberjar {:main heroku-test.handler, :aot :all}}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment