This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (gatling/run-simulation metrics-simulation 200 {:requests 20000}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defn- http-get-with-ids [url ids user-id context callback] | |
| (let [check-status (fn [{:keys [status]}] (callback (= 200 status))) | |
| id (nth ids user-id)] | |
| (http/get (str base-url url id) {} check-status))) | |
| (def article-read | |
| (partial http-get-with-ids "/metrics/article/read/" (cycle (range 100 200)))) | |
| (def program-start | |
| (partial http-get-with-ids "/metrics/program/start/" (cycle (range 200 400)))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Running scenario Ping scenario with 50 concurrency and | |
| requests 50. | |
| Parsing log file(s)... | |
| 18:52:37.513 [main] INFO i.g.c.result.reader.FileDataReader - Collected List(/home/mhjort/Projects/clj-gatling-example/tmp/input/simulation.log) from input | |
| 18:52:37.521 [main] INFO i.g.c.result.reader.FileDataReader - First pass | |
| 18:52:37.530 [main] INFO i.g.c.result.reader.FileDataReader - First pass done: read 151 lines | |
| 18:52:37.535 [main] INFO i.g.c.result.reader.FileDataReader - Second pass | |
| 18:52:37.569 [main] INFO i.g.c.result.reader.FileDataReader - Second pass: read 151 lines | |
| Parsing log file(s) done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (gatling/run-simulation ping-simulation 50) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (def base-url "http://clj-gatling-demo-server.herokuapp.com") | |
| (defn- http-get [url user-id context callback] | |
| (let [check-status (fn [{:keys [status]}] (callback (= 200 status)))] | |
| (http/get (str base-url url) {} check-status))) | |
| (def ping | |
| (partial http-get "/ping")) | |
| (def ping-simulation |
NewerOlder