Permalink
Browse files

Working with new max-threads stuff in nsfw.

  • Loading branch information...
1 parent e151780 commit 46e5507f18a8b1653ae74b790a6bbc60fcd2c9b2 @zk committed Jul 3, 2011
Showing with 10 additions and 5 deletions.
  1. +1 −1 project.clj
  2. +4 −1 src/heroku_bench/core.clj
  3. +2 −2 src/heroku_bench/dev.clj
  4. +3 −1 src/heroku_bench/web.clj
View
@@ -2,5 +2,5 @@
:description "Heroku Benchmarking Webapp"
:dependencies [[org.clojure/clojure "1.2.1"]
[org.clojure/clojure-contrib "1.2.0"]
- [nsfw "0.2.3"]]
+ [nsfw "0.2.4"]]
:dev-dependencies [[swank-clojure "1.2.0"]])
@@ -113,7 +113,10 @@
(def routes
(app
[""] index
- ["threads"] threads))
+ ["threads"] threads
+ ["wait"] (fn [req]
+ (Thread/sleep 500)
+ (render :text "ok!"))))
(defn wrap-exceptions [h]
(fn [r]
View
@@ -2,5 +2,5 @@
(require [heroku-bench.core :as core]
[nsfw.server :as server]))
-(defonce s (server/make (var core/entry-handler) :port 3000))
-(server/start s)
+(defonce s (server/make (var core/entry-handler)))
+(server/start s :port 3000 :max-threads 1000 :min-threads 2)
View
@@ -3,5 +3,7 @@
[nsfw.server :as server]))
(defn -main []
- (-> (server/make core/entry-handler :port (Integer/parseInt (get (System/getenv) "PORT" "8080")))
+ (-> (server/make core/entry-handler
+ :port (Integer/parseInt (get (System/getenv) "PORT" "8080"))
+ :max-threads 20)
server/start))

0 comments on commit 46e5507

Please sign in to comment.