(a quick load-test is good if you're impatient)
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
| // | |
| // Custom Artillery functions to print the latency distribution for a single HTTP request | |
| // | |
| // Example usage: (in your scenario) | |
| // - get: | |
| // url: "/some/endpoint" | |
| // beforeRequest: ["recordStartTime"] | |
| // afterResponse: ["logLatencyDelta"] | |
| // name: "Optional name for the endpoint for the report" |
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
| item | peanuts | |
|---|---|---|
| item | starburst | |
| item | eggs | |
| item | butter | |
| item | creamer | |
| item | pudding | |
| item | yogurt | |
| item | egg%20noodles | |
| item | alfredo |
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
| config: | |
| target: "http://localhost:3003" | |
| phases: | |
| - duration: 1 | |
| arrivalRate: 1 | |
| scenarios: | |
| - flow: | |
| - get: | |
| url: "/" | |
| - get: |
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
| - post: | |
| url: "/some/url" | |
| formData: | |
| firstName: "Jerry" | |
| lastName: "Winston" | |
| headers: | |
| authorization: "Bearer {{access_token}}" |
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
| // | |
| // Lambda's timeout needs to be >5 seconds, 10 should do | |
| // | |
| var startedAt = new Date(); | |
| var interval = setInterval(function () { | |
| console.log(startedAt, new Date()); | |
| }, 1000); |
