summaryrefslogtreecommitdiff
path: root/src/benchmark.clj
diff options
context:
space:
mode:
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