summaryrefslogtreecommitdiff
path: root/test/dumpfm
diff options
context:
space:
mode:
authorScott Ostler <scottbot9000@gmail.com>2010-06-14 18:26:14 -0400
committerScott Ostler <scottbot9000@gmail.com>2010-06-14 18:26:14 -0400
commit409fa6db8aa74e0f67b20acd6349f2df7516f5f4 (patch)
tree8285b645ae207df86fc079773b2f5691fa568853 /test/dumpfm
parent91430f25eea4da648ee84b2aebe498670baa949b (diff)
Add /chat to load test
Diffstat (limited to 'test/dumpfm')
-rw-r--r--test/dumpfm/load_test.clj14
1 files changed, 11 insertions, 3 deletions
diff --git a/test/dumpfm/load_test.clj b/test/dumpfm/load_test.clj
index 68eda68..fe56e62 100644
--- a/test/dumpfm/load_test.clj
+++ b/test/dumpfm/load_test.clj
@@ -20,7 +20,10 @@
(def userlist-query "
select u.nick, u.hash
-from users u, messages m where u.user_id = m.user_id
+from users u, messages m
+where u.user_id = m.user_id
+and u.user_id not in
+ (select user_id from mutes where (set_on + duration < now()))
group by u.nick, u.hash
having count(*) > 50
order by count(*) desc
@@ -53,6 +56,9 @@ limit 100
:params params
:method "GET")))
+(defn chat []
+ (do-request! "/test/chat"))
+
(defn refresh []
(let [params {:since (- (System/currentTimeMillis) 2000)
:room "test"}]
@@ -69,10 +75,12 @@ limit 100
:method "POST")))
(def test-spec {:server "http://localhost:8080"
- :clients 100
- :requests 10000
+ :clients 10
+ :requests 1000
+ :max-latency 1000
:setup-func login-client
:funcs [[55 refresh]
+ [3 chat]
[5 post-msg]]
:frequency 1
})