mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 01:12:56 +03:00
7066b52777
So you can do: ``` $ HASURA_GRAPHQL_EE_LICENSE_KEY=... scripts/dev.sh graphql-engine-pro ``` along with the `--prof-*` modes etc. PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8894 GitOrigin-RevId: 2257749b2936cbd3230beb23e774ac92989e2fbc
319 lines
8.8 KiB
YAML
319 lines
8.8 KiB
YAML
# This tells graphql-bench that it's testing a hasura instance and should
|
|
# collect some additional metrics:
|
|
extended_hasura_checks: true
|
|
headers:
|
|
X-Hasura-Admin-Secret: my-secret
|
|
Accept-Encoding: gzip
|
|
|
|
# Anchors to help us DRY below; settings here may be overridden selectively
|
|
constants:
|
|
scalars:
|
|
- &low_load 20
|
|
- &medium_load 100
|
|
- &high_load 500
|
|
|
|
k6_custom: &k6_custom
|
|
tools: [k6]
|
|
execution_strategy: CUSTOM
|
|
|
|
settings: &settings
|
|
# This is equivalent to wrk2's approach:
|
|
executor: 'constant-arrival-rate'
|
|
timeUnit: '1s'
|
|
maxVUs: 500 # NOTE: required, else defaults to `preAllocatedVUs`
|
|
duration: '60s'
|
|
|
|
queries:
|
|
############################################################################
|
|
# A very simple query returning no rows. A baseline for the benchmark below.
|
|
- name: small_query_low_load
|
|
<<: *k6_custom
|
|
options:
|
|
k6:
|
|
# See note on Chinook.simple_query_low_load
|
|
discardResponseBodies: true
|
|
scenarios:
|
|
main:
|
|
<<: *settings
|
|
rate: *low_load
|
|
# tune this so it's just high enough that we can expect to not need
|
|
# to allocate during the test:
|
|
preAllocatedVUs: 10
|
|
query: &small_query |
|
|
query MyQuery {
|
|
aouulefavluzmkd {
|
|
afqqxqkiyibuccz
|
|
}
|
|
}
|
|
|
|
- name: small_query_high_load
|
|
<<: *k6_custom
|
|
options:
|
|
k6:
|
|
scenarios:
|
|
main:
|
|
<<: *settings
|
|
rate: *high_load
|
|
# tune this so it's just high enough that we can expect to not need
|
|
# to allocate during the test:
|
|
preAllocatedVUs: 50
|
|
query: *small_query
|
|
|
|
############################################################################
|
|
# A large query returning no rows. How does this compare to above? How does
|
|
# it compare to a query from chinook that returns little data?
|
|
- name: huge_query_low_load
|
|
<<: *k6_custom
|
|
options:
|
|
k6:
|
|
# See note on Chinook.simple_query_low_load
|
|
discardResponseBodies: true
|
|
scenarios:
|
|
main:
|
|
<<: *settings
|
|
rate: *low_load
|
|
preAllocatedVUs: 20
|
|
query: &huge_query |
|
|
query MyQuery {
|
|
avnnjybkglhndgc {
|
|
bhdvbvtikfpzzzi {
|
|
amwqazmmnrmnpep
|
|
avnnjybkglhndgc(limit: 2) {
|
|
bhdvbvtikfpzzzi {
|
|
amwqazmmnrmnpep
|
|
aelitqplyjbudtg
|
|
avnnjybkglhndgc_aggregate {
|
|
aggregate {
|
|
count
|
|
}
|
|
}
|
|
avnnjybkglhndgc {
|
|
bhdvbvtikfpzzzi {
|
|
avnnjybkglhndgc {
|
|
ypyynrnicfelhoa
|
|
mozxpgxfqyoflfy
|
|
ftbuftsifulkfef
|
|
gcgxpbzitewgjfq(where: {_and: {avnnjybkglhndgc: {bhdvbvtikfpzzzi: {avnnjybkglhndgc: {ypyynrnicfelhoa: {_eq: ""}}}}}}) {
|
|
bgssgjcrnyvdhgj
|
|
bzvpaxbebukffqa
|
|
felhxylqzathmzg
|
|
jiwnvptjddwkpub
|
|
kwuvazmzrckjiwd
|
|
lfbdaknrdgrdyob
|
|
lsdbuqrfcmzuoiq
|
|
ppqfbdpbvygbjqe
|
|
pyrmluepmvbkauy
|
|
rjzfajqvaxfjnfv
|
|
tkxykgrteozwppc
|
|
yppheggqiyclbmg
|
|
}
|
|
ytbguypxmteukch {
|
|
eioyhdrhnxvnjgq
|
|
chavxisgckppceo
|
|
emojtgbykwcsasf_aggregate(limit: 1) {
|
|
nodes {
|
|
atujakdwuavibfs
|
|
mozxpgxfqyoflfy
|
|
ytbguypxmteukch {
|
|
azyplftmeorxhbg {
|
|
uclgdxfykcsupfy(where: {zchccmznhdwcyyk: {_gt: 10}}) {
|
|
fbrjqdhyhfrufka
|
|
fdaufkdgffxhwjt
|
|
eresulfxruxgauy
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
rgajytdbzlrqtjc
|
|
qwfxccufmuuhdkh
|
|
qiirajrbqfhtepv {
|
|
byuwtzavnnfphdb
|
|
cfceikbyshpbgzb_aggregate(offset: 10) {
|
|
nodes {
|
|
eydctogzeddjeje
|
|
dtxtdmrvbiqdnhw
|
|
fzbriqaymwtbbcv(limit: 2) {
|
|
atujakdwuavibfs
|
|
mozxpgxfqyoflfy
|
|
mwcitdymkwgnljf
|
|
ypyynrnicfelhoa
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
rvkwxbcbykpolag(order_by: {cuyspsadpcpwfgn: asc}) {
|
|
cuyspsadpcpwfgn
|
|
gwkbipliejeqvck
|
|
ivxowxfitlpzwma
|
|
hjyfezsxxymocek {
|
|
ajmryhdgplutcfv
|
|
ankyuplezhaxmwh
|
|
}
|
|
}
|
|
ylfijjhnpbqnxdg {
|
|
qqhruyfclqsgkoi
|
|
rghujqiztetxqvr
|
|
rmiwettrtghoqrg {
|
|
brtgvqwxpxxpjsn(distinct_on: qqhruyfclqsgkoi) {
|
|
qqhruyfclqsgkoi
|
|
}
|
|
dhbepsvydbaowdg(where: {hhzbfpqbvtemdxn: {awzuxwwdvulkzsp: {_gt: 10}}}) {
|
|
qqhruyfclqsgkoi
|
|
rghujqiztetxqvr
|
|
}
|
|
}
|
|
}
|
|
znxjapvcubkzhtv_aggregate {
|
|
aggregate {
|
|
count(distinct: false)
|
|
}
|
|
nodes {
|
|
dodppghpbvtdrzt
|
|
dovdwfgspicingr
|
|
dczgjksdfomxthp
|
|
}
|
|
}
|
|
}
|
|
|
|
- name: huge_query_medium_load
|
|
<<: *k6_custom
|
|
options:
|
|
k6:
|
|
scenarios:
|
|
main:
|
|
<<: *settings
|
|
# NOTE: we can't keep up at high_load, it seems:
|
|
rate: *medium_load
|
|
preAllocatedVUs: 100
|
|
query: *huge_query
|
|
|
|
############################################################################
|
|
# The standard introspection query from server/src-rsr/introspection.json
|
|
# We don't expect a server to be hammered with these, but they are crucial
|
|
# for clients (like graphiql):
|
|
|
|
- name: full_introspection
|
|
<<: *k6_custom
|
|
options:
|
|
k6:
|
|
# See note on Chinook.simple_query_low_load
|
|
discardResponseBodies: true
|
|
scenarios:
|
|
main:
|
|
# Since this is currently quite slow and we're not as interested in
|
|
# understanding a heavy load of introspection requests, just
|
|
# collect as many samples we can in a reasonable time frame, with
|
|
# one client:
|
|
executor: 'constant-vus'
|
|
vus: 1
|
|
duration: '120s'
|
|
query: |
|
|
query IntrospectionQuery {
|
|
__schema {
|
|
queryType {
|
|
name
|
|
}
|
|
mutationType {
|
|
name
|
|
}
|
|
subscriptionType {
|
|
name
|
|
}
|
|
types {
|
|
...FullType
|
|
}
|
|
directives {
|
|
name
|
|
description
|
|
locations
|
|
args {
|
|
...InputValue
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
fragment FullType on __Type {
|
|
kind
|
|
name
|
|
description
|
|
fields(includeDeprecated: true) {
|
|
name
|
|
description
|
|
args {
|
|
...InputValue
|
|
}
|
|
type {
|
|
...TypeRef
|
|
}
|
|
isDeprecated
|
|
deprecationReason
|
|
}
|
|
inputFields {
|
|
...InputValue
|
|
}
|
|
interfaces {
|
|
...TypeRef
|
|
}
|
|
enumValues(includeDeprecated: true) {
|
|
name
|
|
description
|
|
isDeprecated
|
|
deprecationReason
|
|
}
|
|
possibleTypes {
|
|
...TypeRef
|
|
}
|
|
}
|
|
|
|
fragment InputValue on __InputValue {
|
|
name
|
|
description
|
|
type {
|
|
...TypeRef
|
|
}
|
|
defaultValue
|
|
}
|
|
|
|
fragment TypeRef on __Type {
|
|
kind
|
|
name
|
|
ofType {
|
|
kind
|
|
name
|
|
ofType {
|
|
kind
|
|
name
|
|
ofType {
|
|
kind
|
|
name
|
|
ofType {
|
|
kind
|
|
name
|
|
ofType {
|
|
kind
|
|
name
|
|
ofType {
|
|
kind
|
|
name
|
|
ofType {
|
|
kind
|
|
name
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|