Created
November 15, 2019 11:47
-
-
Save davidmukiibi/d72f9fd357e46b1cd8b60ac7b58565cb to your computer and use it in GitHub Desktop.
cloud k6 performance test script
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 { check, sleep } from "k6"; | |
import http from "k6/http"; | |
export let options = { | |
stages: [ | |
{ duration: "60s", target: 10 }, | |
{ duration: "60s", target: 0 } | |
], | |
thresholds: { | |
http_req_duration: ["p(95)<500"] | |
}, | |
ext: { | |
loadimpact: { | |
name: "k6 cloud test!", | |
distribution: { | |
scenarioLabel1: { loadZone: "amazon:us:ashburn", percent: 100 } | |
} | |
} | |
} | |
}; | |
export default function() { | |
let res = http.get("https://test.loadimpact.com/"); | |
check(res, { | |
"is status 200": (r) => r.status === 200 | |
}); | |
sleep(10); | |
; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment