Created
November 22, 2021 15:19
-
-
Save misTrasteos/498117676dc4ac19ae064e588a817fc1 to your computer and use it in GitHub Desktop.
K6 basic example
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 { randomString } from 'https://jslib.k6.io/k6-utils/1.1.0/index.js'; | |
export const options = { | |
stages: [ | |
{ duration: '30s', target: 500 }, | |
{ duration: '2m', target: 1000 }, | |
{ duration: '30s', target: 0 } | |
] | |
}; | |
export const params = { | |
headers: { | |
'Content-Type': 'application/json' | |
}, | |
tags: { | |
ktest: 'yes' | |
} | |
}; | |
export function setup(){ | |
return {}; | |
}//setup | |
export function teardown(data){ | |
}//teardown | |
export default function () { | |
// replace the url | |
http.get('http://jbang-service:8080/hi/'+ randomString(10)); | |
}//default |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment