Last active
November 26, 2017 04:54
-
-
Save ppcano/478dd0ba8ef2b688d57d7b9d54146a51 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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