Add benchmark script (#666)

This commit is contained in:
Ta-Ching Chen
2018-05-05 12:42:16 +08:00
committed by GitHub
parent f0dc2554a1
commit 6a3e326f36
10 changed files with 601 additions and 2 deletions
+17
View File
@@ -0,0 +1,17 @@
import http from "k6/http";
import { check } from "k6";
export let options = {
stages: [
{ duration: "15s", target: 10 },
{ duration: "45s", target: 500 },
]
};
export default function() {
let params = { timeout: 30 }
let res = http.get(`${__ENV.FN_ENDPOINT}`)
check(res, {
"status is 200": (r) => r.status === 200
});
};