Created
October 12, 2018 23:50
-
-
Save enigmatikme/67ef5c9d5deec3de41c6729f41b2de97 to your computer and use it in GitHub Desktop.
RPS for Proxy w/ Setup
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
import http from 'k6/http'; | |
import { check, sleep } from 'k6'; | |
//If you want to avoid having to type --vus 10 and --duration 30s | |
export let options = { | |
vus: 50, | |
rps: 2000, | |
duration: '1m' | |
}; | |
export default function() { | |
var num = Math.floor(Math.random() * Math.floor(100)); | |
let res = http.get(`http://ec2-13-57-211-36.us-west-1.compute.amazonaws.com:3000/`, {tags: {name: "GetData"}}); | |
// let res = http.get(`http://13.57.247.46/artist/${num}`, {tags: {name: "GetData"}}); | |
check(res, { | |
'status was 200': (r) => r.status === 200, | |
'transaction time OK': (r) => r.timings.duration < 500 | |
}); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment