Last active
October 7, 2018 23:23
-
-
Save enigmatikme/63eb3d683f3ea5a70c86d11dc2317189 to your computer and use it in GitHub Desktop.
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: 500, | |
rps: 2000, | |
duration: '1m' | |
}; | |
export default function() { | |
var num = Math.floor(Math.random() * Math.floor(100)); | |
let res = http.get(`http://localhost:3003/artist/${num}`); | |
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