summaryrefslogtreecommitdiff
path: root/test/dumpfm/load_test.clj
diff options
context:
space:
mode:
Diffstat (limited to 'test/dumpfm/load_test.clj')
-rw-r--r--test/dumpfm/load_test.clj25
1 files changed, 24 insertions, 1 deletions
diff --git a/test/dumpfm/load_test.clj b/test/dumpfm/load_test.clj
index 2410032..49069e9 100644
--- a/test/dumpfm/load_test.clj
+++ b/test/dumpfm/load_test.clj
@@ -56,6 +56,25 @@ limit 100
:params params
:method "GET")))
+(defn rand-nick []
+ (:nick (rand-elt userlist)))
+
+(defn load-profile []
+ (do-request! (str "/" (rand-nick))
+ :label "profile"))
+
+(defn load-popular-profile []
+ (do-request! (str "/" (rand-nick))
+ :label "popular-profile"))
+
+(defn load-popular-popular []
+ (do-request! (str "/" (rand-elt ["ryder" "jeanette"]) "/popular")
+ :label "popular-popular"))
+
+(defn load-popular []
+ (do-request! (str "/" (rand-nick) "/popular")
+ :label "popular"))
+
(defn chat []
(do-request! "/test/chat"))
@@ -75,11 +94,15 @@ limit 100
:method "POST")))
(def test-spec {:server "http://localhost:8080"
- :clients 200
+ :clients 75
:requests 10000
:max-latency 1000
:setup-func login-client
:funcs [[55 refresh]
+ [10 load-popular]
+ [10 load-profile]
+ [3 load-popular-popular]
+ [3 load-popular-profile]
[3 chat]
[5 post-msg]]
:frequency 1