Skip to content

Instantly share code, notes, and snippets.

@davidmukiibi
Created November 15, 2019 11:47
Show Gist options
  • Save davidmukiibi/d72f9fd357e46b1cd8b60ac7b58565cb to your computer and use it in GitHub Desktop.
Save davidmukiibi/d72f9fd357e46b1cd8b60ac7b58565cb to your computer and use it in GitHub Desktop.
cloud k6 performance test script
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