diff options
| author | Scott Ostler <scottbot9000@gmail.com> | 2010-08-23 20:04:44 -0400 |
|---|---|---|
| committer | Scott Ostler <scottbot9000@gmail.com> | 2010-08-23 20:04:44 -0400 |
| commit | de21bc98b04e8eb55b9a0448cda311f6c52f89f6 (patch) | |
| tree | ebacc66d2d9fe4da79cbf49c8157fb69f4f9d71a /test/dumpfm/load_test.clj | |
| parent | a70175759c5761f7aa4280280afa44fcb3f85c3b (diff) | |
add perf. test
Diffstat (limited to 'test/dumpfm/load_test.clj')
| -rw-r--r-- | test/dumpfm/load_test.clj | 25 |
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 |
