Skip to content

Instantly share code, notes, and snippets.

@ppcano
Last active November 26, 2017 04:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ppcano/478dd0ba8ef2b688d57d7b9d54146a51 to your computer and use it in GitHub Desktop.
Save ppcano/478dd0ba8ef2b688d57d7b9d54146a51 to your computer and use it in GitHub Desktop.
import http from "k6/http";
import { sleep } from "k6";
import { Counter } from "k6/metrics";
const vus = 10,
iterations = 10;
export let options = {
vus: vus,
iterations: vus*iterations
};
var requestCounterMetric = new Counter("requestCounterMetric");
export default function() {
http.get("http://test.loadimpact.com");
requestCounterMetric.add(1);
console.log(`VU: ${__VU} - ITER: ${__ITER}`);
sleep(1);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment