graphql-engine/server/benchmarks/benchmark_sets/huge_schema/config.query.yaml
Brandon Simmons c415cd7c0d server benchmarks: add introspection queries
This excercises a different code path from regular queries and is
pretty slow. Motivated by https://github.com/hasura/graphql-engine-mono/pull/2835

We may need to break chinook up into two sets if it keeps growing or
becomes a bottleneck, but do that later.

GitOrigin-RevId: 5832aef520db85f694924e038c0f2c9a7dd17a13
2021-12-09 15:10:42 +00:00

286 lines
7.9 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
# Anchors to help us DRY below; settings here may be overridden selectively
constants:
scalars:
- &low_load 20
- &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:
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: |
query MyQuery {
aouulefavluzmkd {
afqqxqkiyibuccz
}
}
############################################################################
# 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:
scenarios:
main:
<<: *settings
rate: *low_load
preAllocatedVUs: 20
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
}
}
}
############################################################################
# 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:
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
}
}
}
}
}
}
}
}