summaryrefslogtreecommitdiff
path: root/src/benchmark.clj
diff options
context:
space:
mode:
authorsostler <sbostler@gmail.com>2009-11-15 22:54:20 -0500
committersostler <sbostler@gmail.com>2009-11-15 22:54:20 -0500
commit31b8a27fbaa272a7990f452194912d229a3eede4 (patch)
tree75766f72979f8db2ce9169d357422b9600d5735c /src/benchmark.clj
parent6a0934931cbccbb5a4b26b1ca470d93236f47ea3 (diff)
Checkin
Diffstat (limited to 'src/benchmark.clj')
-rwxr-xr-xsrc/benchmark.clj12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/benchmark.clj b/src/benchmark.clj
index 3adf843..d963b74 100755
--- a/src/benchmark.clj
+++ b/src/benchmark.clj
@@ -53,13 +53,15 @@
(struct message-struct nick msg (System/currentTimeMillis))))
(alter users assoc-in [nick :last-seen] (System/currentTimeMillis))
"OK")))
-
+
+(defn out [x]
+ "out")
(defn do-bench []
(let [r (.nextDouble random)]
- (cond (< r 0.8) (json-str (refresh))
- (< r 0.9) (json-str (add-user))
- (< r 1) (json-str (post-message)))))
+ (cond (< r 0.8) (out (refresh))
+ (< r 0.9) (out (add-user))
+ (< r 1) (out (post-message)))))
(defn hello-world []
"hello world!")
@@ -71,4 +73,4 @@
(add-user)
(run-server {:port 8080}
- "/*" (servlet benchmark)) \ No newline at end of file
+ "/*" (servlet benchmark)) \ No newline at end of file