Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Performance test example
import http from "k6/http";
import { sleep } from "k6";
export let options = {
duration: '45s',
thresholds: {
"http_req_duration": ["p(99)<500"]
const BASE_URL = '';
export default function() {
let req;
req = http.get(`${BASE_URL}/public/crocodiles/`);
let crocs = JSON.parse(req.body);
if (crocs && crocs.length) {
req = http.get(`${BASE_URL}/public/crocodiles/${crocs[0].id}/`);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment