Skip to content

Instantly share code, notes, and snippets.

@fernyb
Created November 28, 2022 02:36
Show Gist options
  • Save fernyb/0311426beebb50ffac2de646571cfb0a to your computer and use it in GitHub Desktop.
Save fernyb/0311426beebb50ffac2de646571cfb0a to your computer and use it in GitHub Desktop.
Soak Load Test Charles Proxy
import http from "k6/http";
import { sleep } from "k6";
export let options = {
insecureSkipTLSVerify: true,
stages: [
{ duration: '30s', target: 2 },
{ duration: '2m', target: 5 },
{ duration: '1m', target: 0 },
]
};
const API_BASE_URL = "https://localhost.charlesproxy.com:7124/api/v1"
export default function () {
http.batch([
["GET", `${API_BASE_URL}/foods/1/`],
]);
sleep(10);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment