Created
November 27, 2020 03:37
-
-
Save cuongld2/7376707a104dcbfa4744be97af61e6b5 to your computer and use it in GitHub Desktop.
k6 test code
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'; | |
export let options = { | |
vus: 1000, | |
duration: '300s', | |
}; | |
export default function () { | |
let host = 'example'; | |
let payload = JSON.stringify({"query":"query ($filter: JSON) { population_var (accessibility: all, offset: 1, first: 20, filter: $filter) { variant_id hvgsg_id af ac an gq variant_caller dbsnp_id variant_class impact gene_symbol consequence num_het num_hom_alt num_hom_ref num_unknown subject_count } }","variables":{"filter": {"AND": []}}} | |
); | |
let params = { | |
headers: { | |
'Content-Type': 'application/json', | |
'Host':host, | |
'Content-Length':'330' | |
}, | |
}; | |
http.post('https://'+host+'/gas/graphql',payload,params); | |
sleep(1); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment